Job Queue and header redirects not working

General discussion forum for the Zend Server
Post Reply
ryan5432
Posts: 4
Joined: Mon Apr 08, 2013 12:14 pm

Job Queue and header redirects not working

Post by ryan5432 » Mon Apr 08, 2013 12:19 pm

I am trying to use the Job queue to run some portions of my website behind the scenes, but those portions require an authenticated user. So I wrote a way to authenticate and then redirect to the pages I want the job queue to run. However the Job Queue seems to be ignoring the header( 'Location:' ) that I am using for the redirect.

Is this not supported, or am I doing it wrong?

yonman
Posts: 486
Joined: Thu Dec 10, 2009 4:50 pm
Location: Here, There, Everywhere!
Contact:

Re: Job Queue and header redirects not working

Post by yonman » Mon Apr 08, 2013 1:52 pm

Hey Ryan

Thanks for using Zend Server and Job Queue in particular.
Unfortunately, this behavior is not supported for JobQueue.
"It's only hubris if I fail" - Gaius Julius Caesar

ryan5432
Posts: 4
Joined: Mon Apr 08, 2013 12:14 pm

Re: Job Queue and header redirects not working

Post by ryan5432 » Mon Apr 08, 2013 1:57 pm

Thanks for the reply, but that was a really vague response. Can you elaborate and tell me what particularity is not supported, and what the supported alternative is?

ryan5432
Posts: 4
Joined: Mon Apr 08, 2013 12:14 pm

Re: Job Queue and header redirects not working

Post by ryan5432 » Mon Apr 08, 2013 2:44 pm

So the more I dig into this the more confused I am getting.

Because Job Queue takes a URL it leads me to believe that it is running a browser like cURL. If it is running a browser then why can't it handle my above case? Everything works great when I paste the URL I am trying to run in Chrome, Firefox, or any other desktop browser.

Can I give the job queue a filesystem path to the php file I want it to run?

It is seeming more and more that I am going to have to use a regular cron to handle my task, which is unfortunate because of all the other benefits of the Job Queue.

User avatar
rbzend
Zend Global Support
Posts: 536
Joined: Tue Dec 23, 2008 5:03 pm

Re: Job Queue and header redirects not working

Post by rbzend » Mon Apr 08, 2013 5:15 pm

Hi Ryan,

JobQueue does not run a browser. It has its own small HTTP client that lacks most of the smart response processing. The feature request to enhance this client's functionality already exists in our issue tracker.
Roman Basayev
Rogue Wave Support
https://support.roguewave.com/

Post Reply