Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Queued Jobs - status broken!


Reply


3 Posts   911 Views

Avatar
borriej

Community Member, 267 Posts

6 September 2011 at 3:04am

Edited: 06/09/2011 3:05am

Ive installed Lucene module.
For it to work i need Queued Jobs module.
Downloaded, installed both.

Clicked 'rebuild search index'-button
task appears in the Jobs tab in the CMS

tried to run task by going to: http://www.url.nl/folder/dev/tasks/ProcessJobQueueTask?flush=all

It says:

Running task 'ProcessJobQueueTask'...
[2011-09-05 16:59:28] Processing queue 2 [2011-09-05 16:59:28] Running Rebuild the Lucene search engine index

but the browser isnt working/refreshing..

When i go to the CMS > Jobs, the status of the task is changed to broken.

The docs of lucene say:

To get queued jobs to run, you also need to add $_FILE_TO_URL_MAPPING to your
_ss_environment.php file as described in the SilverStripe docs:

I didnt do this. Cant find the file ss_environment.php

Any ideas?

Avatar
Marcus

Administrator, 86 Posts

6 September 2011 at 12:53pm

In the root of your site, create a file called _ss_environement.php

In that file place the following

<?php
// Set the $_FILE_MAPPING for running the test cases, it's basically a fake but useful
global $_FILE_TO_URL_MAPPING;
$_FILE_TO_URL_MAPPING[dirname(__FILE__)] = 'http://www.url.nl/folder';

What this is doing is telling SilverStripe how to figure out URLs for your site when it's executing in a CLI environment.

Once that's added in, make sure you click the 'play' icon next to the job to restart it (you might actually need to 'pause' it first, then hit play). If you see a 'gear' icon, you can click that and the job will process immediately in your browser.

Avatar
lanks

Community Member, 61 Posts

8 January 2012 at 12:36am

Hi Marcus

I am also having issues with status broken and my queued jobs. I can execute the jobs from the font end by calling the process method manually. It is only when I use the QueuedJobService to queue the jobs that they instantly turn to status broken once they execute.

This is all happening running on a Windows Server 2008 environment hosted using IIS 7.5. The jobs work fine on my Ubuntu dev machine.

I tried your suggestion with the _ss_environment file but the jobs still aren't working.

I have also tried manually clicking the process button in the CMS Jobs tab but the job doesn't process properly. The request finishes instantly and nothing is returned. Normally when you do this the ajax post for the job will hang until the job is finished.

Any ideas as to what could be causing this?

Liam