symbiote/silverstripe-queuedjobs

A framework for defining and running background jobs in a queued manner

Installs: 235 423

Dependents: 45

Suggesters: 13

Security: 0

Stars: 52

Watchers: 8

Forks: 62

Open Issues: 51

Type:silverstripe-vendormodule


README

Build Status Scrutinizer SilverStripe supported module

Overview

The Queued Jobs module provides a framework for SilverStripe developers to define long running processes that should be run as background tasks. This asynchronous processing allows users to continue using the system while long running tasks proceed when time permits. It also lets developers set these processes to be executed in the future.

The module comes with

  • A section in the CMS for viewing a list of currently running jobs or scheduled jobs.
  • An abstract skeleton class for defining your own jobs.
  • A task that is executed as a cronjob for collecting and executing jobs.
  • A pre-configured job to cleanup the QueuedJobDescriptor database table.

Installation

composer require symbiote/silverstripe-queuedjobs

Now setup a cron job:

*/1 * * * * /path/to/silverstripe/vendor/bin/sake dev/tasks/ProcessJobQueueTask

Documentation

Show job data

In case you need an easy access to additonal job data via CMS for debug purposes enable the show_job_data option by including the configuration below.

Symbiote\QueuedJobs\DataObjects\QueuedJobDescriptor:
  show_job_data: true

This will add Job data and Messages raw tabs to the job descriptor edit form. Displayed information is read only.

Contributing

Translations

Translations of the natural language strings are managed through a third party translation interface, transifex.com. Newly added strings will be periodically uploaded there for translation, and any new translations will be merged back to the project source code.

Please use https://www.transifex.com/projects/p/silverstripe-queuedjobs to contribute translations, rather than sending pull requests with YAML files.