Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Platypush
platypush
Commits
55958c1b
Verified
Commit
55958c1b
authored
Apr 28, 2022
by
Fabio Manganiello
Browse files
[
#217
] Casting `get_next` to `datetime` to prevent DST issues
parent
e9454b0c
Pipeline
#222
passed with stages
in 8 minutes and 47 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
platypush/cron/scheduler.py
View file @
55958c1b
...
...
@@ -90,8 +90,8 @@ class Cronjob(threading.Thread):
now
=
get_now
()
self
.
_event_type
=
CronjobEvent
.
NONE
cron
=
croniter
.
croniter
(
self
.
cron_expression
,
now
)
next_run
=
cron
.
get_next
()
self
.
_event
.
wait
(
max
(
0
,
next_run
-
now
.
t
imestamp
()))
next_run
=
cron
.
get_next
(
datetime
.
datetime
)
self
.
_event
.
wait
(
max
(
0
,
(
next_run
-
now
)
.
t
otal_seconds
()))
def
stop
(
self
):
self
.
_event_type
=
CronjobEvent
.
STOP
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment