Download attachments in separate queue from message processing
This commit is contained in:
parent
a43a78731a
commit
1d2c3ae23c
34 changed files with 2062 additions and 214 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue