I'm developing a site for a customer which regularly sends email notifications, to facilitate this I have a cron job which runs at 2am to start scheduling individual tasks to send out the notications. This is all fine and work perfectly with tasks being scheduled to execute immediately, but to assist development and testing I've written some CLI apps which use ipython
and the remote_api_stub
to interact with my application and datastore, when I schedule tasks on the command line like this:
task = taskqueue.Task(url='/admin/tasks/email', params={'email': email, 'type': notif.type})
task.add("email")
I get a 1 hour delay on the task execution. Why is this? and is there a way to get the task to execute immediately?