to be or not to be... run by scheduler

80 views
Skip to first unread message

Manuele Pesenti

unread,
Oct 20, 2017, 9:09:40 AM10/20/17
to web2py-users
Hi *!

Is there a way to distinguish from within a function if it's run from
the scheduler or not?

thanks a lot

    M.

Anthony

unread,
Oct 20, 2017, 11:20:33 AM10/20/17
to web2py-users
If it is a scheduler execution, request.is_scheduler will be True.

Anthony

Manuele Pesenti

unread,
Oct 26, 2017, 3:57:11 AM10/26/17
to web...@googlegroups.com
It seams that the parameter request.is_scheduler is always set to false
on my colleague windows system

could it be a possible bug? Any other experience?

    M.

Dave S

unread,
Oct 28, 2017, 3:03:05 AM10/28/17
to web2py-users


On Thursday, October 26, 2017 at 12:57:11 AM UTC-7, Manuele wrote:
It seams that the parameter request.is_scheduler is always set to false
on my colleague windows system

could it be a possible bug? Any other experience?

     M.


I can confirm that on AWS linux, request.is_scheduler is true for functions reached by -K and false for functions reached by -S.

On Windows, 2.14.6 sets request.is_scheduler false for browser requests, at least when using Rocket.

/dps

Anthony

unread,
Oct 28, 2017, 7:14:04 AM10/28/17
to web2py-users
On Thursday, October 26, 2017 at 3:57:11 AM UTC-4, Manuele wrote:
> It seams that the parameter request.is_scheduler is always set to false
> on my colleague windows system
>
> could it be a possible bug? Any other experience?

That was a bug but should be fixed in web2py 2.15.

If you can't upgrade, as an alternative, see:

https://groups.google.com/d/msg/web2py/JeE6jLP-qjI/MXS0MVdOCQAJ

Anthony

Manuele Pesenti

unread,
Oct 30, 2017, 7:39:47 AM10/30/17
to web...@googlegroups.com
Ok that's the problem, I'm using a 2.14.6 release.

Thanks Anthony and others
Reply all
Reply to author
Forward
0 new messages