Skip to content

Commit e3c13da

Browse files
authored
chore(tasks): consider inactive after 9mins last execution only [skip ci] [#33]
1 parent 9af7ba8 commit e3c13da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

functions/lib/tasks.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,10 @@ const handleWorker = async () => {
241241
.set({ running: false, last_excution: admin.firestore.Timestamp.now() })
242242
} finally {
243243
const lastExcution = queueController.data().last_excution
244-
if (differenceInMinutes(admin.firestore.Timestamp.now().toDate(), lastExcution.toDate()) > 2) {
244+
if (differenceInMinutes(admin.firestore.Timestamp.now().toDate(), lastExcution.toDate()) > 9) {
245245
queueControllerRef.doc(queueController.id)
246246
.set({ running: false, last_excution: admin.firestore.Timestamp.now() })
247-
logger.info('[handleWorker]: changed running to false because has more 2 minutes inactivity')
247+
logger.info('[handleWorker]: changed running to false because has more 9 minutes inactivity')
248248
}
249249
}
250250
}

0 commit comments

Comments
 (0)