On Feb26, 9:27pm, AchipA <attila.cs...@gmail.com> wrote:
>
> On Feb 26, 1:44 pm, Iceberg <iceb...@21cn.com> wrote:
>
> > On Feb26, 7:35pm, AchipA <attila.cs...@gmail.com> wrote:
>
> > > On Feb 26, 5:23 am, Iceberg <iceb...@21cn.com> wrote:
>
> > > > 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.
> > > 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..
>
>
> > Before that future comes, how about this dirty hack? I do not fully
> > test it due to not know how to build another windows distribution by
> > my own. So I just guess it might work.
>
> > Create this function in applications/myapp/controller/default.py:
> >   def test():
> >     import sys
> >     return {'':sys.argv[0]}
> > And visit it.
>
> > If you are running web2py from the source code, you get the output as
> > "web2py.py".
> > If you are running web2py from the windows distrib, you get the output
> > as "web2py".
>
> > So we can try this after the definition of crontype in cron.py:
>
> > crontype='Soft'
> > if sys.argv[0]=='web2py': # Likely running in a windows distribution
> >   crontype='Hard' # Force it to hardcron. Somehow necessary. :-/

> If it works for you, sure, but I expect that future to be in 1.57 :)
> As a bonus feature, if you use db mode (required on GAE) you will get
> a 'free' cron log, too.

Hi Achipa,

When hearing the news that web2py 1.57 is released and "4) Achipa
fixed an issue with cron and added documentation", I download
web2py_win.zip 1.57 and test above problem one more time, but find out
that problem still exists.  Actually I do not notice any significant
change in cron.py, neither the documentation. Did I miss something?
Thanks.

Iceberg
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to