I've tried returning 0,1,2,None. It behaves the same regardless. There is
only one user in my development database:
DEBUG:web2py.app.myapp:Found user: 123456789
DEBUG:web2py.app.myapp: Updated.
DEBUG:web2py.app.myapp: new task report: COMPLETED
DEBUG:web2py.app.myapp: result: 1
DEBUG:web2py.app.myapp:Found user: 123456789
On Tuesday, April 25, 2017 at 2:12:04 PM UTC-5, Dave S wrote:
>
>
>
> On Tuesday, April 25, 2017 at 9:34:48 AM UTC-7, James Holstead wrote:
>>
>> I have a scheduler.py in my models directory with two functions,
>> syncUsers, testAdd
>>
>> # create scheduler
>> myScheduler = Scheduler(db, migrate=False, tasks=dict(myfunc=syncUsers))
>>
>> #myScheduler = Scheduler(db, migrate=False,
>> tasks=dict(myfunc=testAdd))
>>
>> # sync user task once a day
>> myScheduler.queue_task('myfunc', repeats=0, period=86400, timeout=1200,
>> prevent_drift=True, immediate=True)
>>
>>
>> When I schedule testAdd, it executes once a day. When I schedule
>> syncUsers it ignores the period argument, and repeats immediately.
>>
>> testAdd simply returns 1, syncUsers loops through the user database and
>> compares some fields with an external data source.
>>
>> Any ideas what is happening?
>>
>>
> What does syncUsers() return?
>
> /dps
>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.