Merge pull request #23 from horjulf/develop

Fix auto run negative sleep
pull/26/head
Filipe Santos 7 years ago committed by GitHub
commit 01589f7d1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -733,7 +733,7 @@ def run(add_delay=2.5, no_search=False, no_notifications=False):
try: try:
# Sleep until next run # Sleep until next run
log.info("Next job at %s", schedule.next_run()) log.info("Next job at %s", schedule.next_run())
time.sleep(schedule.idle_seconds() or 0) time.sleep(max(schedule.idle_seconds(), 0))
# Check jobs to run # Check jobs to run
schedule.run_pending() schedule.run_pending()
@ -764,13 +764,13 @@ def init_notifications():
if __name__ == "__main__": if __name__ == "__main__":
print(""" print("""
,--. ,--. ,--. ,--. ,--. ,--.
,-' '-.,--.--. ,--,--.| |,-.,-' '-. ,--,--.,--.--.,--.--. ,-' '-.,--.--. ,--,--.| |,-.,-' '-. ,--,--.,--.--.,--.--.
'-. .-'| .--'' ,-. || /'-. .-'' ,-. || .--'| .--' '-. .-'| .--'' ,-. || /'-. .-'' ,-. || .--'| .--'
| | | | \ '-' || \ \ | | \ '-' || | | | | | | | \ '-' || \ \ | | \ '-' || | | |
`--' `--' `--`--'`--'`--' `--' `--`--'`--' `--' `--' `--' `--`--'`--'`--' `--' `--`--'`--' `--'
######################################################################### #########################################################################
# Author: l3uddz # # Author: l3uddz #
# URL: https://github.com/l3uddz/traktarr # # URL: https://github.com/l3uddz/traktarr #

Loading…
Cancel
Save