Rocket.Chat.Apps-engine
Rocket.Chat.Apps-engine copied to clipboard
[FIX] schedular.cancelJob() being async due to a broken promise
What? :boat:
Why? :thinking:
if we either use cancelJob or cancelAllJobs method of ISchedulerModify, the operation runs asynchronously due to which there is no way for apps to know if the operation was completed. This PR attempts to fix this
Sample code:
await configurationModify.scheduler.cancelJob(
JobId.JOBS_RESTART_JOB,
);
Note: even with the await above, it still runs asynchronously :grimacing: