[web2py] Re: Scheduler task finishes but row not marked COMPLETED

2014-08-29 Thread Stephen Weiss
I tried using strace to see what the process was doing and this is what I found. Not sure it's of any help or not? [root@centos-63 ~]# !ps ps -ef | grep web root 8228 7923 0 13:21 pts/500:00:03 python web2py.py -K APITool2 root 8425 8228 0 13:58 pts/500:00:00 python web2py.

[web2py] Re: Scheduler task finishes but row not marked COMPLETED

2014-08-25 Thread Niphlod
sorry for not being able to pinpoint the root cause, but every task you queue has potentially zillions of variables to go though. if a def mytask(a, b): return a+b works, then the "culprit" of the scheduler not being able to finish the task MAY (I'm pretty sure scheduler is ATM robustly

[web2py] Re: Scheduler task finishes but row not marked COMPLETED

2014-08-25 Thread Stephen Weiss
No, not doing any print statements, only logger.debug calls. The work that the running task does make Popen calls, not popen2 calls, if that's any help. However, I don't know how to go about checking if the stderr and/or stdout pipes are not filled. No, I didn't try running the task in a web2p

[web2py] Re: Scheduler task finishes but row not marked COMPLETED

2014-08-22 Thread Niphlod
ok, so it's definitely getting "hanged" between your "custom logging" (that you say it's just before the return at the end of your task) and updating the result + the status of the task. Are you by any chance using lots of print statements in your task ? If you're using popen2 (that anyway is NO

[web2py] Re: Scheduler task finishes but row not marked COMPLETED

2014-08-22 Thread Stephen Weiss
Niphlod, The following is the output from start of scheduler to the point where I Ctrl-C'd it, with the task run in the middle Here's the process output during the run... [root@centos-63 ~]# ps -ef | grep web root 7585 7521 0 05:34 pts/000:00:00 python web2py.py -K APITool2 -D 0 root

[web2py] Re: Scheduler task finishes but row not marked COMPLETED

2014-08-22 Thread Niphlod
Given the weirdness, I'd still want to see the entire thing with the DEBUG level. On Thursday, August 21, 2014 8:36:44 PM UTC+2, Stephen Weiss wrote: > > > Yes, those messages appear far back in the logs, which I didn't include. > > I only included a snapshot of the debug output at the end of the

[web2py] Re: Scheduler task finishes but row not marked COMPLETED

2014-08-21 Thread Stephen Weiss
Yes, those messages appear far back in the logs, which I didn't include. I only included a snapshot of the debug output at the end of the scheduled task's work, as setting the status to COMPLETED would be at that point, not? -- Resources: - http://web2py.com - http://web2py.com/book (Documenta

[web2py] Re: Scheduler task finishes but row not marked COMPLETED

2014-08-21 Thread Niphlod
it still looks very weird. There should be lines "task starting", "looping", etc. I guess you activated the DEBUG log but that is not configured to be on DEBUG level on logging.conf. On Thursday, August 21, 2014 12:38:04 PM UTC+2, Stephen Weiss wrote: > > > Here's a run taken from a shell in whi

[web2py] Re: Scheduler task finishes but row not marked COMPLETED

2014-08-21 Thread Stephen Weiss
Here's a run taken from a shell in which scheduler was run manually with '-D 0' option enabled. DEBUG:Tool: lines are loggers from within my models file tasks.py. At the end I hit Ctrl-C to quit the scheduler process. DEBUG:web2py.scheduler.centos-63#6814:recording heartbeat (RUNNING) D

[web2py] Re: Scheduler task finishes but row not marked COMPLETED

2014-08-20 Thread Niphlod
you have very weird logging prefixes it doesn't seem you're doing something wrong (that's just because you didn't past ANY code to support you) but I'd like to see the "surrounding" lines of the scheduler log. If it's too long just attach it. On Wednesday, August 20, 2014 3:33:41 PM UTC+2,