mirror of
https://github.com/wekan/wekan.git
synced 2026-02-20 23:14:07 +01:00
Fix unhandled Promise rejection in cron migration job callback
The createCronJob method's job callback was not async and did not await this.runMigrationStep(step), causing the returned Promise to float. When runMigrationStep threw, the unhandled rejection triggered quave:synced-cron's global handler which called process.exit(0), crashing the app on startup.
This commit is contained in:
parent
8afdcd7a4c
commit
15f979f08a
1 changed files with 2 additions and 2 deletions
|
|
@ -1646,8 +1646,8 @@ class CronMigrationManager {
|
|||
SyncedCron.add({
|
||||
name: step.cronName,
|
||||
schedule: (parser) => parser.text(step.schedule),
|
||||
job: () => {
|
||||
this.runMigrationStep(step);
|
||||
job: async () => {
|
||||
await this.runMigrationStep(step);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue