Merge pull request 'checkinbox moved to worker' (#461) from 2579-worker_time_control into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #461 Reviewed-by: Carlos Jimenez Ruiz <carlosjr@verdnatura.es>
This commit is contained in:
commit
d6c921819f
|
@ -76,12 +76,6 @@
|
|||
},
|
||||
"UserLog": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"WorkerTimeControlParams": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"WorkerTimeControlMail": {
|
||||
"dataSource": "vn"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
module.exports = Self => {
|
||||
require('../methods/imap-time-control/checkInbox')(Self);
|
||||
};
|
|
@ -35,6 +35,10 @@ module.exports = Self => {
|
|||
imap.once('ready', function() {
|
||||
openInbox(function(err, box) {
|
||||
if (err) throw err;
|
||||
const totalMessages = box.messages.total;
|
||||
if (totalMessages == 0)
|
||||
imap.end();
|
||||
|
||||
let f = imap.seq.fetch('1:*', {
|
||||
bodies: ['HEADER.FIELDS (FROM SUBJECT)', '1'],
|
||||
struct: true
|
|
@ -55,6 +55,12 @@
|
|||
},
|
||||
"WorkerLog": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"WorkerTimeControlParams": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"WorkerTimeControlMail": {
|
||||
"dataSource": "vn"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = Self => {
|
||||
require('../methods/worker-time-control-mail/checkInbox')(Self);
|
||||
};
|
Loading…
Reference in New Issue