[web2py] Re: how to correctly use the scheduler (if at all)

2016-03-06 Thread noam cohen
> > Here is the summary of what I came up with, if anyone has similar > situation. > modules/long_task.py: def nwm_send_email(mailer,*args,**kwargs): """Send an email using the supplied dict args. This function is called by the scheduler""" args = args[1] # the first element is

[web2py] how to correctly use the scheduler (if at all)

2016-03-02 Thread noam cohen
Hi I have the following scenario: A scheduled task runs every T seconds (e.g. 60), and executes a function F() In function F() I scan some db tables and according to the business logic, may need to send several email messages. The book

[web2py] use case: user login on android

2015-12-09 Thread noam cohen
Hi I need help implementing this scenario: user opens the android app. app checks if he is currently logged in. if not, open the login web page ( in a webview - as seen in the

[web2py] how do debug my error if not using web browser?

2015-11-23 Thread noam cohen
I have a controller with a syntax error or some other error. When accessing it using Chrome (for example), I see the stack trace and can easily fix it. However, my real http client is a mobile app that send http GET commands to the server. It just sees the "500 internal error" and from this time

[web2py] Re: hello all and a minor typo

2015-11-16 Thread noam cohen
Where is the recommended location to add the queue_task() so it runs exactly once when my app starts? I thought about .../applications/my_app/__init__.py but it was called TWICE (once by the web server and once by the scheduler, if I got it right) I could of course check if the task is already

[web2py] hello all and a minor typo

2015-11-14 Thread noam cohen
Hello web2py'ers I have just started using web2py for a pet project I am working on and like it a lot. My experience is mostly in C++ so I might ask silly questions here :) TYPO in the book: in http://web2py.com/books/default/chapter/29/04/the-core#web2py-Scheduler completed_runs =