From 3b8b4da149fbc1b17d09253693823f5135a55f2e Mon Sep 17 00:00:00 2001 From: zadam Date: Sat, 4 Jan 2020 21:59:28 +0100 Subject: [PATCH] task context progress fixes --- src/services/task_context.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/task_context.js b/src/services/task_context.js index db9474d83..9c4c354b0 100644 --- a/src/services/task_context.js +++ b/src/services/task_context.js @@ -12,8 +12,8 @@ class TaskContext { this.data = data; // progressCount is meant to represent just some progress - to indicate the task is not stuck - this.progressCount = 0; - this.lastSentCountTs = Date.now(); + this.progressCount = -1; // we're incrementing immediatelly + this.lastSentCountTs = 0; // 0 will guarantee first message will be sent // just the fact this has been initialized is a progress which should be sent to clients // this is esp. important when importing big files/images which take long time to upload/process