Currently, a periodic job that's inserted gets a value in scheduled_at
that defaults to the database's now(). Here, we alter this with a
minor nicety requested in #340 wherein we set scheduled_at to the
precise time we expected a periodic job to be scheduled. This value is
will be very close to now(), but likely a little sooner because
there's some lag in the insert loop between when job insert params are
generated and when the insert happens.
Jobs are inserted with state available (rather than scheduled), so
this should have very little functional effect. In a busy system it may
cause the periodic jobs to be favored slightly because when locking
available jobs, scheduled_at is one of the fields we order on for
priority.
Currently, a periodic job that's inserted gets a value in
scheduled_at
that defaults to the database'snow()
. Here, we alter this with a minor nicety requested in #340 wherein we setscheduled_at
to the precise time we expected a periodic job to be scheduled. This value is will be very close tonow()
, but likely a little sooner because there's some lag in the insert loop between when job insert params are generated and when the insert happens.Jobs are inserted with state
available
(rather thanscheduled
), so this should have very little functional effect. In a busy system it may cause the periodic jobs to be favored slightly because when locking available jobs,scheduled_at
is one of the fields we order on for priority.