Concurrency

In general, Mechanic will run as many of your events/tasks/actions simultaneously as possible. This means that multiple tasks subscribing to the same event topic are very likely to execute simultaneously, when such an event occurs. Learn more about runs here.

To protect the health of the system and to ensure performance for every store on our platform, Mechanic does have several concurrency limits.

Limits

  • Each store's Mechanic account has a fixed run queue size. If your store's is set to 20, for example, Mechanic will perform at most 20 runs simultaneously per store. This could be 20 events, or 20 tasks, or 5 events and 10 tasks and 5 actions, or any other combination of runs. Additional runs will be performed as the preceding runs complete. (Run queue sizes are only configurable by Mechanic staff.)
  • Mechanic will wait to perform a "shopify" action until it is allowed to do so by the Shopify API rate limit for your store. Read more about this, from Shopify.

Tips

  • To ensure that your tasks are working with up-to-date information, consider reloading your resources at the beginning of the task script. For example, a task responding to a customer event might include {% assign customer = customer.reload %} at the very beginning, to ensure that any changes to the customer (since the original event) are reflected in the customer variable.
  • For options for ordering execution of runs, see How can I control run order?.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.