Fixed issue where tasks would not initialize properly after migration until server restart

streaming-only subscriptions now autopause due to deprecated
pull/668/head
Isaac Abadi 3 years ago
parent a7f8795e7e
commit 301451d021

@ -187,7 +187,7 @@ async function checkMigrations() {
if (!new_db_system_migration_complete) {
logger.info('Beginning migration: 4.2->4.3+')
let success = await db_api.importJSONToDB(db.value(), users_db.value());
await tasks_api.setupTasks(); // necessary as tasks were not properly initialized at first
// sets migration to complete
db.set('new_db_system_migration_complete', true).write();
if (success) { logger.info('4.2->4.3+ migration complete!'); }
@ -571,6 +571,9 @@ function calculateSubcriptionRetrievalDelay(subscriptions_amount) {
}
async function watchSubscriptions() {
// auto pause deprecated streamingOnly mode
await db_api.updateRecords('subscriptions', {streamingOnly: true}, {paused: true});
let subscriptions = await subscriptions_api.getAllSubscriptions();
if (!subscriptions) return;

Loading…
Cancel
Save