You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
673 B
34 lines
673 B
// url.js
|
|
// Copyright (C) 2022 DTP Technologies, LLC
|
|
// License: Apache-2.0
|
|
|
|
'use strict';
|
|
|
|
const fetch = require('node-fetch'); // jshint ignore:line
|
|
|
|
const { SiteService } = require('../../lib/site-lib');
|
|
|
|
class UrlService extends SiteService {
|
|
|
|
constructor (dtp) {
|
|
super(dtp, module.exports);
|
|
}
|
|
|
|
async start ( ) {
|
|
const { jobQueue: jobQueueService } = this.dtp.services;
|
|
this.log.info('attaching to URL job queue');
|
|
this.urlJobQueue = jobQueueService.getJobQueue('url', {
|
|
attempts: 3
|
|
});
|
|
}
|
|
|
|
async ingest (/* url */) {
|
|
|
|
}
|
|
}
|
|
|
|
module.exports = {
|
|
slug: 'url',
|
|
name: 'url',
|
|
create: (dtp) => { return new UrlService(dtp); },
|
|
};
|