latest changes and fixes
This commit is contained in:
@ -18,6 +18,7 @@ async function taskSyncLSAUsers() {
|
||||
['users_whitelist', whitelist],
|
||||
]);
|
||||
} catch (err) {
|
||||
console.log('err :>> ', err);
|
||||
console.log('ERR executing taskSyncLSAUsers');
|
||||
}
|
||||
}
|
||||
@ -40,16 +41,21 @@ async function taskSyncPrevioudDaySessions(callsign) {
|
||||
|
||||
}
|
||||
|
||||
module.exports = function() {
|
||||
if (canRunTasks) {
|
||||
cron.schedule(process.env.SYNC_TASK_SCHEDULE, () => {
|
||||
taskSyncPrevioudDaySessions('LTS');
|
||||
});
|
||||
cron.schedule(process.env.USERS_TASK_SCHEDULE, async() => {
|
||||
taskSyncLSAUsers();
|
||||
});
|
||||
console.log('Tasks started.');
|
||||
} else {
|
||||
console.log('Tasks skipped.');
|
||||
}
|
||||
}
|
||||
module.exports = {
|
||||
sync: function() {
|
||||
console.log('canRunTasks :>> ', canRunTasks);
|
||||
if (canRunTasks) {
|
||||
cron.schedule(process.env.SYNC_TASK_SCHEDULE, () => {
|
||||
taskSyncPrevioudDaySessions('LTS');
|
||||
});
|
||||
// cron.schedule(process.env.USERS_TASK_SCHEDULE, async() => {
|
||||
// taskSyncLSAUsers();
|
||||
// });
|
||||
console.log('Tasks started.');
|
||||
} else {
|
||||
console.log('Tasks skipped.');
|
||||
}
|
||||
},
|
||||
taskSyncLSAUsers,
|
||||
taskSyncPrevioudDaySessions,
|
||||
};
|
Reference in New Issue
Block a user