Open dlqqq opened 2 years ago
Thoughts I had while reviewing #253:
The bug documented in #253 partly originated from the fact that we're "overly eager" about removing tasks from the queue even when we don't need to. I believe the workaround I suggested in #253 could be removed if we change the body of the while
loop in process_queue()
.
continue
and pop the task from the queue if cache record doesn't exist
if time_diff < 0: break
conditional as far up in the while
loop as possibleelif time_diff >= (self.poll_interval * 1000): break
blockwhile
loop continues as normal
get_localized_timestamp()
and instead just converttask.next_run_time
to UTC.TaskRunner.compute_time_diff()
in a ternary statement. When setting default values for records, we should set them as "high up" as possible for visibility. I suggest making job definition timezones non-optional and enforcing the default value in either theJobDefinition
table model or in theCreateJobDefinition
request model._Originally posted by @dlqqq in https://github.com/jupyter-server/jupyter-scheduler/pull/106#discussion_r990568083_