Skip to content

Commit

Permalink
More logs when creating job from schedule model, using fromtimestamp …
Browse files Browse the repository at this point in the history
…instead of utc_from_timestamp

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
  • Loading branch information
aaronchongth committed Jan 3, 2024
1 parent 1195374 commit 9c1c2c3
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,12 @@ def to_job(self) -> Job:
print(f"to_job until: {self.until}")
print(f"to_job until timestamp: {self.until.timestamp()}")
print(
f"to_job until timestamp utc: {datetime.utcfromtimestamp(self.until.timestamp())}"
f"to_job until utcfromtimestamp: {datetime.utcfromtimestamp(self.until.timestamp())}"
)
job = job.until(datetime.utcfromtimestamp(self.until.timestamp()))
print(
f"to_job until fromtimestamp: {datetime.fromtimestamp(self.until.timestamp())}"
)
job = job.until(datetime.fromtimestamp(self.until.timestamp()))

if self.period in (
ScheduledTaskSchedule.Period.Monday,
Expand All @@ -100,7 +103,7 @@ def to_job(self) -> Job:
# Hashable value in order to tag the job with a unique identifier
job.tag(self._id)
if self.at is not None:
print(self.at)
print(f"setting at {self.at}")
job = job.at(self.at)

return job
Expand Down

0 comments on commit 9c1c2c3

Please sign in to comment.