mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Fix migrations.
Thanks to xet7 !
This commit is contained in:
parent
e61f6b1c89
commit
0acbf30b03
2 changed files with 61 additions and 0 deletions
|
|
@ -369,6 +369,24 @@ class CronJobStorage {
|
|||
completedSteps: jobSteps.filter(step => step.status === 'completed').length
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear all jobs from storage
|
||||
*/
|
||||
clearAllJobs() {
|
||||
try {
|
||||
// Clear all collections
|
||||
CronJobStatus.remove({});
|
||||
CronJobSteps.remove({});
|
||||
CronJobQueue.remove({});
|
||||
|
||||
console.log('All cron job data cleared from storage');
|
||||
return { success: true, message: 'All cron job data cleared' };
|
||||
} catch (error) {
|
||||
console.error('Error clearing cron job storage:', error);
|
||||
return { success: false, error: error.message };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Export singleton instance
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue