Download attachments in separate queue from message processing
This commit is contained in:
@@ -131,6 +131,13 @@ module.exports = {
|
||||
removeUnprocessed,
|
||||
removeAllUnprocessed,
|
||||
|
||||
getNextAttachmentDownloadJobs,
|
||||
saveAttachmentDownloadJob,
|
||||
resetAttachmentDownloadPending,
|
||||
setAttachmentDownloadJobPending,
|
||||
removeAttachmentDownloadJob,
|
||||
removeAllAttachmentDownloadJobs,
|
||||
|
||||
removeAll,
|
||||
removeAllConfiguration,
|
||||
|
||||
@@ -854,6 +861,27 @@ async function removeAllUnprocessed() {
|
||||
await channels.removeAllUnprocessed();
|
||||
}
|
||||
|
||||
// Attachment downloads
|
||||
|
||||
async function getNextAttachmentDownloadJobs(limit) {
|
||||
return channels.getNextAttachmentDownloadJobs(limit);
|
||||
}
|
||||
async function saveAttachmentDownloadJob(job) {
|
||||
await channels.saveAttachmentDownloadJob(job);
|
||||
}
|
||||
async function setAttachmentDownloadJobPending(id, pending) {
|
||||
await channels.setAttachmentDownloadJobPending(id, pending);
|
||||
}
|
||||
async function resetAttachmentDownloadPending() {
|
||||
await channels.resetAttachmentDownloadPending();
|
||||
}
|
||||
async function removeAttachmentDownloadJob(id) {
|
||||
await channels.removeAttachmentDownloadJob(id);
|
||||
}
|
||||
async function removeAllAttachmentDownloadJobs() {
|
||||
await channels.removeAllAttachmentDownloadJobs();
|
||||
}
|
||||
|
||||
// Other
|
||||
|
||||
async function removeAll() {
|
||||
|
Reference in New Issue
Block a user