ok, spotted the problem. Attaching the patch here, sent it to Massimo to
apply to trunk.
On Monday, November 5, 2012 12:12:34 AM UTC+1, villas wrote:
>
> Hi Niphlod,
>
> Windows 7
> Running latest web2py trunk source.
>
> I restarted web2py.py from commandline
> I started a separate process for scheduler: python web2py.py -K schedtest
> -D 0
> I went to the page as before and pressed the buttons.
>
> I noticed that when I DISABLE the worker I get continous lines of this...
> DEBUG:web2py.scheduler:Someone stopped me, sleeping until better times
> come (2)
> DEBUG:web2py.scheduler:Someone stopped me, sleeping until better times
> come (3)
>
> When I ENABLE the worker I get this line interspersed...
> DEBUG:web2py.scheduler:........recording heartbeat (DISABLED)
>
> Yes, it says DISABLED even though my browser is saying ENABLED. Hmm
>
> I'll send the log separately because it doesn't seem to attach properly to
> this post.
>
--
diff -r 3294880fe6ea gluon/scheduler.py
--- a/gluon/scheduler.py dom nov 04 18:12:41 2012 -0600
+++ b/gluon/scheduler.py lun nov 05 01:32:04 2012 +0100
@@ -739,6 +739,8 @@
db(sw.worker_name == self.worker_name).update(
last_heartbeat=now, status=ACTIVE)
self.worker_status[1] = 1 # re-activating the process
+ if self.worker_status[0] <> RUNNING:
+ self.worker_status[0] = ACTIVE
self.do_assign_tasks = False