On Feb 26, 5:23 am, Iceberg <iceb...@21cn.com> wrote: > I don't really understand how cron patch works but, since the global > crontype equals to "Soft" by default, is there some reason causing the > win distrib to detect itself as running in cgi or wsgi mode and > therefore the soft cron mode?
Not really detecting - when you start via web2py.py it sets hard cron, no special checks anywhere (that's why -H doesn't make sense). As you yourself noted, global import variables can be tricky/ugly and apparently do not work the same way when compiled or py2exe-d. Probably will have to introduce a file-based scheme (which is in the works anyway to prevent multi-process race conditions), but it's not that easy as workarounds for GAE will be needed.. > Maybe add some logging.warn(...) so that > we can better know which xxxxhandler.py is actually invoked during win > distrib runs. If you have hardcron, you will actually get a logging message about that (.info priority). In other modes it's a bit trickier as cron code doesn't start until a page is invoked (or at all if disabled or external). > When I import > this module and change it (indirectly), I still do not sure what is > its value when another part of code import this module again. It just > smells bad. :-/ Agreed, I do intend of changing this in the future. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---