Merge lp:~nursix.org/web2py/patches into lp:~mdipierro/web2py/devel
Proposed by
nursix
Status: | Needs review |
---|---|
Proposed branch: | lp:~nursix.org/web2py/patches |
Merge into: | lp:~mdipierro/web2py/devel |
Diff against target: | 0 lines |
To merge this branch: | bzr merge lp:~nursix.org/web2py/patches |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Massimo | Pending | ||
Review via email:
|
Description of the change
Patch for scheduler to let repeats=0 really mean unlimited repeats.
To post a comment you must log in.
Unmerged revisions
- 3774. By nursix
-
Merge trunk.
- 3773. By nursix
-
Merge trunk.
- 3772. By Dominic König <email address hidden>
-
Merge trunk.
- 3771. By Dominic König <email address hidden>
-
Merge trunk.
- 3770. By nursix
-
Merge trunk.
- 3769. By nursix
-
Merge trunk.
- 3768. By nursix
-
Merge trunk.
- 3767. By nursix
-
Merge trunk.
- 3766. By nursix
-
Merge trunk.
- 3765. By nursix
-
Merge trunk.
Wow, this email sure went astray. How/why did *I* receive this? I
participated on the web2py forum a couple of years ago - and not since
then. Weird.
---
rb
On Tue, 2011-09-13 at 18:03 +0000, nursix wrote: /code.launchpad .net/~nursix. org/web2py/ patches/ +merge/ 75235 scheduler. py' belongs( (QUEUED, RUNNING) ))\ run<ts. repeats) \ run<ts. repeats) | (ts.repeats == 0))\ time<=now) \ run_time< =now)\ timedelta( seconds= task.period) name)s. %(function_ name)s' % task) n_name,
> nursix has proposed merging lp:~nursix.org/web2py/patches into lp:~mdipierro/web2py/devel.
>
> Requested reviews:
> Massimo (mdipierro)
>
> For more details, see:
> https:/
>
> Patch for scheduler to let repeats=0 really mean unlimited repeats.
> differences between files attachment (review-diff.txt)
> === modified file 'gluon/
> --- gluon/scheduler.py 2011-09-12 02:25:00 +0000
> +++ gluon/scheduler.py 2011-09-13 18:03:25 +0000
> @@ -368,7 +368,7 @@
> try:
> logging.debug(' grabbing all queued tasks')
> all_available = db(ts.status.
> - (ts.times_
> + ((ts.times_
> (ts.start_
> (ts.stop_time>now)\
> (ts.next_
> @@ -394,7 +394,7 @@
> return None
> next_run_time = task.last_run_time + datetime.
> times_run = task.times_run + 1
> - if times_run < task.repeats:
> + if times_run < task.repeats or task.repeats == 0:
> run_again = True
> else:
> run_again = False
> @@ -409,7 +409,7 @@
> db.commit()
> break
> except:
> - db.rollback
> + db.rollback()
> logging.info('new task %(id)s "%(task_name)s" %(application_
> return Task(
> app = task.applicatio
>