Error 302 for Tasks

64 views
Skip to first unread message

Paul Canning

unread,
Mar 16, 2015, 11:11:22 AM3/16/15
to google-a...@googlegroups.com
I am trying to use Tasks in my application, but when they try to run, I get a 302 error.

I am using the CodeIgniter framework.

Below is my code to add a task (I can see the task in the queue, it just fails for some reason)

I think the issue is to do with the URL defined in the PusTask. CodeIgniter uses routes to handle the controller methods and I think it is looking for a bog standard *.php file, which I don't have (and don't really want to use).

Has anyone got CI working with Tasks?

$task = new PushTask('/path/to/controller', ['id' => $id]);
$task_name = $task->add('my_queue');

Vinny P

unread,
Mar 18, 2015, 2:04:41 AM3/18/15
to google-a...@googlegroups.com
Task queue requests, even failed ones/ones where the route can't be matched, should show up in the application logs. Do you see any error requests in the console? Task queues run from the requesting IP 0.1.0.2, so try looking for request logs originated from that IP. If you do find error logs, can you describe the error you're seeing and what the request looks like?
 
 
-----------------
-Vinny P
Technology & Media Consultant
Chicago, IL

App Engine Code Samples: http://www.learntogoogleit.com
 
 

Paul Canning

unread,
Mar 18, 2015, 3:21:20 AM3/18/15
to google-a...@googlegroups.com

As I said, I get a HTTP 302 "App Error" (that's what it says in the task queue console)

Its something to do with not being able to handle CodeIgniter style URIs, but I don't know how to make it understand them, as the task queue uses "include" to use the task worker script, something you cannot do with an MVC style controller.

--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/V3qKwhXqGLw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/CALSvALBtiM4hbng%2BhyDFagyb_OsYN%2Bagtc5mmK7CtRPTNoCKhA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages