~yerinalexey/pcrond

d8b8d61263aa86579a08192c62364e0b2a41b835 — Luca Vercelli 2 years ago bf1db15
run test
2 files changed, 3 insertions(+), 8 deletions(-)

M pcrond/job.py
M test_scheduler.py
M pcrond/job.py => pcrond/job.py +1 -6
@@ 3,12 3,7 @@ from datetime import datetime, timedelta
import logging
logger = logging.getLogger('pcrond')

"""
@reboot commands will be executed after this number of seconds
"""
WAIT_BEFORE_REBOOT = 10

reboot_time = datetime.now() + timedelta(seconds=WAIT_BEFORE_REBOOT)
reboot_time = datetime.now()

ALIASES = {'@yearly':    '0 0 1 1 *',
           '@annually':  '0 0 1 1 *',

M test_scheduler.py => test_scheduler.py +2 -2
@@ 246,8 246,8 @@ class SchedulerTests(unittest.TestCase):
        start_time = d.now()
        thread = Thread(target=run_in_another_thread)
        thread.start()
        print("Waiting for 15 seconds...")
        time.sleep(15)
        print("Waiting for 3 seconds...")
        time.sleep(3)
        scheduler.ask_for_stop = True
        print("Waiting other thread to stop...")
        thread.join()