I think when you run web2py with the -K option, request.global_settings.scheduler exists and is set to the name/names of the apps passed after the -K option (otherwise, it should be None).
Anthony On Friday, August 3, 2012 12:50:33 PM UTC-4, Vincenzo Ampolo wrote: > > Hi, > > I've an import that takes too much time and resources. Basically it sets > up a NLTK tagger. > > I need this feature imported only if I'm runing as a worker. If I'm > running the webserver or the shell I don't need that import at all. > > Is there a way to detect if I'm a worker when the models/modules are > imported? > > Thank you. > -- > Vincenzo Ampolo > http://vincenzo-ampolo.net > http://goshawknest.wordpress.com > --

