Jump to:

10979 Posts in 2722 Topics by 1815 members

All other Modules

SilverStripe Forums » All other Modules » Queued Jobs - status broken!

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 831 Views
  • borriej
    Avatar
    Community Member
    267 Posts

    Queued Jobs - status broken! Link to this post

    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?

  • Marcus
    Avatar
    Administrator
    86 Posts

    Re: Queued Jobs - status broken! Link to this post

    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.

  • lanks
    Avatar
    Community Member
    61 Posts

    Re: Queued Jobs - status broken! Link to this post

    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

    831 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.