Yes, but the advantage of an automatic conversion on deploment would
still be transparent compatibility across all platforms, which is not
a bad thing to have :)

Also, I wished we had a sort of standardized way of having a
@local_only or @auth.ip_in(...) decorator of sorts (maybe we already
do?).

On Jul 23, 3:02 am, Vidul Petrov <[email protected]> wrote:
> It turnes out that the GAE cron daemon does the same work if it comes
> to a method invocation (should be a valid URL).
> I.e. there is no need for conversion. The problem, as I see it, is the
> method protection, what I did is something like:
>
> # the GAE cron file:
> # /cron.yaml
> cron:
> - description: daily note addition
>   url: /test/default/insert_a_note
>   schedule: every 1 days
>
> # the default.py controller in init app
> # for some reasons Google uses this ip:
> valid_inner_ip = "0.1.0.1"
>
> def insert_a_note():
>     if request.env.remote_addr != valid_inner_ip:
>         redirect(URL(r=request,f="index"))
>     ...
>     db.note.insert(name=some_new_name)
>     ...
>
> That's all.
>
> On Jul 21, 1:16 pm, AchipA <[email protected]> wrote:
>
> > Hm, if I understand correctly, we just need a smart crontab ->cron.yaml 
> > converter then, right ? I can imagine other people needing
> > that too, so there might alredy be such things in the open, could
> > someone verify that ?
>
> > On Jul 21, 11:58 am, Hans Donner <[email protected]> wrote:
>
> > >gaehas its own implemementation
>
> > > -http://code.google.com/appengine/docs/python/config/cron.html
> > > -http://code.google.com/appengine/docs/python/config/queue.html
> > > -http://code.google.com/appengine/docs/python/taskqueue/
>
> > > perhaps some kind of remapping (like cache) can do the trick
>
> > > On Tue, Jul 21, 2009 at 11:39, AchipA<[email protected]> wrote:
>
> > > >GAEis not supported at the moment, but only because I don't use it
> > > > and there was no particular interest in it so far. IfGAEhas no means
> > > > of startingcron-style or long running processes, softcronshould
> > > > stil work, provided someone implements a locking mechanism that works
> > > > withGAE. The current implementation uses file operations as they are
> > > > universal on all platforms (i.e. move file is atomic - that's what the
> > > > infamouscron.master is for). Now, AFAIK this would not work onGAE,
> > > > but if you give/write an example that would replace that conditional
> > > > in aGAE-friendly way it should be no fus to gaincrononGAEout of
> > > > the box.
>
> > > > On Jul 21, 7:03 am, Vidul Petrov <[email protected]> wrote:
> > > >> Probably this topic has been discussed in the past, but I wasn't able
> > > >> to find anything.
> > > >> Thecronscript works fine (it's implemented as a controller method)
> > > >> unless running in theGAEtesting environment.
> > > >> The username in app.yml is web2py, the same goes for the username in
> > > >> "crontab" file.
>
> > > >> Thank you for the help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to