From 0f9224dc5d410c9d6a9693157cfe82d95988ace6 Mon Sep 17 00:00:00 2001 From: Stanislav Kaledin Date: Thu, 12 Apr 2018 11:29:57 +0300 Subject: [PATCH] 0.2.6 release Little fix in example, added random sleep in example job --- examples/example_apscheduler/example_apscheduler/jobs.py | 4 +++- setup.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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",