1. Documentación /
  2. AutomateWoo /
  3. Queue

Queue

The workflow queue contains a list of “workflow tasks” that are due to run at specific times.

Tasks are added to the workflow queue when a workflow’s timing option is set to something other than Run Immediately. Tasks created by manual workflow will also always be added to the queue but are scheduled to run immediately.

The WP-Cron system is used to check whether any queued workflow tasks are due to be run. This WP-Cron event is scheduled to run every two minutes. If there are tasks to be run Action Scheduler will be used to run all the available events.

Increasing speed

↑ Volver al principio

The rate at which queue workflow tasks are processed will vary based on different factors but there is no fixed limit to the number of tasks that can be processed. Some factors that can negatively effect speed are:

  • Poor hosting
  • WP-Cron problems, a host or plugin could restrict how often WP-Cron can run, something could be blocking the queue of scheduled cron jobs.
  • Background job has paused due to too many failures, check the list of failed Action Scheduler actions for anything that includes automatewoo/jobs/run_queued_workflows. If there are 5 failures within one hour the job will pause for an hour to protect against infinite scheduled action loops.
  • Workflows that are configured to perform a high number of slow tasks e.g. API calls, slow database queries

Failed Events

↑ Volver al principio

A queued event can fail because it is missing data. For example, if a workflow task was supposed to email a user but that user has been deleted. When this happens, it remains in the Queue list for 30 days and is marked as failed. From the Queue list you can attempt to run the event again, but it will not reattempt to run by itself.

Filter: automatewoo_failed_events_delete_after