diff --git a/examples/example_apscheduler/example_apscheduler/jobs.py b/examples/example_apscheduler/example_apscheduler/jobs.py index 6914c1a..2a80af4 100644 --- a/examples/example_apscheduler/example_apscheduler/jobs.py +++ b/examples/example_apscheduler/example_apscheduler/jobs.py @@ -1,3 +1,4 @@ +import random import time from apscheduler.schedulers.background import BackgroundScheduler @@ -8,8 +9,9 @@ scheduler.add_jobstore(DjangoJobStore(), "default") -@register_job(scheduler, "interval", seconds=30, replace_existing=True) +@register_job(scheduler, "interval", seconds=5, replace_existing=True) def test_job(): + time.sleep(random.randrange(1, 100, 1)/100.) print("I'm a test job!") # raise ValueError("Olala!") diff --git a/setup.py b/setup.py index 5e665dc..7ee4bac 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='django-apscheduler', - version='0.2.5', + version='0.2.6', description='APScheduler for Django', classifiers=[ "Development Status :: 4 - Beta",