if you can post a simple scheduler.py to reproduce the error I'll be happy
to see it. Generally a "stopped" record in scheduler_task table should have
a corresponding scheduler_run record.
BTW: is this happening also if you start the scheduler not within the TK
widget ?
On Wednesday, October 10, 2012 3:05:28 PM UTC+2, David Marko wrote:
>
> I just encountered strange behaviour with scheduler. I'm using the latest
> trunk web2py version on windows 7 with TK window, so I start scheduler from
> TK scheduler menu. I had a code that run fine and during some monitoring I
> have added the following line to this working code:
> print(x.get('companyname',""))
>
> Suddently I noticed that next scheduler_run entry is created with status
> 'STOPPED' and with no error traceback. Also the worker heartbeat stopped
> and there was no last hearbeat datetime refresh anymore. Worker stopped
> working. Removing this line and restarting scheduler worker enabled
> scheduler and things were working correctly once again.
>
> So I have experimented and found out that x.get('...') returns utf8 value
> so I have changed the print line to
> print(x.get('companyname',"").encode('utf8'))
>
> and things are working fine now ... but not sure why, without the
> encode('utf-8'), the worker failes silently ...
>
--