All Projects → jkowens → magento-jobqueue

jkowens / magento-jobqueue

Licence: MIT License
A database backed asynchronous job queue for Magento

Programming Languages

PHP
23972 projects - #3 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to magento-jobqueue

magento-meanbee-pwa
Progressive Web App extension for Magento 1
Stars: ✭ 75 (+44.23%)
Mutual labels:  magento, magento-1, magento-extension
SomethingDigital AjaxAddToCart
No description or website provided.
Stars: ✭ 19 (-63.46%)
Mutual labels:  magento, magento-1, magento-extension
magento
Free PWA & SPA for Magento
Stars: ✭ 34 (-34.62%)
Mutual labels:  magento, magento-extension
module-blog-comments-recaptcha
module-blog-comments-recaptcha
Stars: ✭ 17 (-67.31%)
Mutual labels:  magento, magento-extension
magento-1
PAYONE Payment Extension for Magento 1
Stars: ✭ 19 (-63.46%)
Mutual labels:  magento, magento-extension
docker-magento
🐳 Environment for a Magento1 application using Docker.
Stars: ✭ 16 (-69.23%)
Mutual labels:  magento, magento-1
magento-alsoviewed
Product recommendation module, based on other customers activities
Stars: ✭ 19 (-63.46%)
Mutual labels:  magento, magento-extension
config-extension
Magento extension that improves config system
Stars: ✭ 20 (-61.54%)
Mutual labels:  magento, magento-extension
module-conflict-detector
magefan.com/magento2-conflict-detector
Stars: ✭ 40 (-23.08%)
Mutual labels:  magento, magento-extension
module-translation
magefan.com/magento-2-translation-extension
Stars: ✭ 35 (-32.69%)
Mutual labels:  magento, magento-extension
magento-ngrok
Magento 2 module for ngrok.io service support
Stars: ✭ 45 (-13.46%)
Mutual labels:  magento, magento-extension
magento2-prometheus-exporter
Simple Magento 2 Prometheus Exporter.
Stars: ✭ 40 (-23.08%)
Mutual labels:  magento, magento-extension
Magento-AMP
Accelerated Mobile Pages (Google AMPs) for Magento1
Stars: ✭ 43 (-17.31%)
Mutual labels:  magento, magento-1
module-blog-sample-data
Sample data for Magento 2 blog extension
Stars: ✭ 15 (-71.15%)
Mutual labels:  magento, magento-extension
module-wysiwyg-advanced
Extend TinyMCE 4 & 5 tools in Magento 2
Stars: ✭ 60 (+15.38%)
Mutual labels:  magento, magento-extension
magento-grid-colors
Magento 2 Grid Colors module for colorizing admin grids. Supports saving of states with the help of grid's bookmarks.
Stars: ✭ 54 (+3.85%)
Mutual labels:  magento, magento-extension
module-catalog
Fixes for some known Magento 2 issues in Catalog
Stars: ✭ 23 (-55.77%)
Mutual labels:  magento, magento-extension
Diglin UIOptimization
Magento module to optimize Javascript and CSS files and improve speed of your website
Stars: ✭ 53 (+1.92%)
Mutual labels:  magento, magento-1
module-login-as-customer
Allows admin to login as a customer (enter to customer account).
Stars: ✭ 104 (+100%)
Mutual labels:  magento, magento-extension
Mzeis ServerTiming
Sends profiling information as a Server Timing HTTP header to the browser
Stars: ✭ 26 (-50%)
Mutual labels:  magento, magento-1

JobQueue

JobQueue allows Magento applications to place tasks in a queue to be processed asynchronously. It is built on DJJob and makes use of the existing MySQL backend. Some tasks this may be ideal for are:

  • Downloading files
  • Processing batch jobs
  • Sending data to a back-office application or third party systems

System Requirements

  • PHP 5.1 or higher
  • MySQL 4.1.20 or higher
  • Magento CE1.6.0-1.9.x/EE1.7.0-1.14.x

Usage

Jobs must extend Jowens_JobQueue_Model_Job_Abstract and implement the perform() method.

class Foo_Bar_Model_Order_Job extends Jowens_JobQueue_Model_Job_Abstract
{
  public function perform() {
    // implementation logic
  }
}

That job can then be used like so:

$job = Mage::getModel('bar/order_job');
$job->setName('Order# 12345')
    ->enqueue();

Name is used to identify the job in backend, so be descriptive! The enqueue method can take two optional parameters, a string for queue name and timestamp to specify a time to run the job.

The job can also be attempted immediately. If it fails it is added to the default queue for retry.

$job = Mage::getModel('bar/order_job');
$job->setName('Order# 12345')
    ->performImmediate();

To put the job on a queue other than the default one, performImmediate takes an optional string value for the name of the retry queue.

Running Jobs

JobQueue requires Magento cron to be configured in order to run pending jobs. By default a JobQueue worker executes the pending jobs every 5 minutes. If a job fails it will be retried up to 10 times. Both of these settings can be configured in the admin panel under System > Configuration > General > JobQueue.

Jobs in other queues can be executed by adding more cron entries to a custom module config.xml.

<crontab>
    <jobs>
        <jobqueue_orders>
          <schedule>
            <config_path>jobqueue/config/cron_expr</config_path>
          </schedule>
          <run>
            <model>jobqueue/worker::executeJobs</model>
          </run>
          <queue>orders</queue>
        </jobqueue_orders>
    </jobs>
</crontab>

Alternatively workers could be configured to run as they normally would using DJJob. See the documentation.

Monitoring Jobs

Pending and failed jobs can be monitored in the admin panel by going to System > JobQueue.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].