Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Set scheduledTime and startTime with currentTime for all system tasks #3278

Merged
merged 2 commits into from
Oct 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ public List<TaskModel> createTasks(List<TaskModel> tasks) {
// update the task_lookup table
tasks.forEach(
task -> {
task.setScheduledTime(System.currentTimeMillis());
if (task.getScheduledTime() == 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This solves the negative queue wait time.

task.setScheduledTime(System.currentTimeMillis());
}
session.execute(
updateTaskLookupStatement.bind(
workflowUUID, toUUID(task.getTaskId(), "Invalid task id")));
Expand Down