Recv/lib/workers/expiration.js

23 lines
423 B
JavaScript
Raw Normal View History

const async = require('async');
const AbstractIntervalWorker = require('./abstractintervalworker');
class ExpirationWorker extends AbstractIntervalWorker
{
constructor(repository)
{
super();
this.repository = repository;
}
async tick()
{
var self = this;
await self.repository.uploads.deleteExpired();
await self.repository.codes.deleteExpired();
}
}
module.exports = ExpirationWorker;