How to handle priority¶
sending a double-optin email message (for email address verification before purchase).
sending a purchase confirmation email.
sending a follow-up email to users who have not completed their purchase after 7 days.
Workable), but all three have a different priority:double-optin-email (or high-priority)
confirmation-email (or generics)
follow-up-email (or low-priority)
workers to take charge of only a specific type of group. This way, thanks to the number of workers present on each queue (group) we will have different processing speeds for jobs.1 worker that works on the
follow-up-email(orlow-priority) queue2 workers that work on the
confirmation-email(orgenerics) queue4 workers that work on the
double-optin-email(orhigh-priority) queue
only one job belonging to the
follow-up-emailgroup at a time (So in case there are 2 jobs in thelow-prioritygroup both scheduled for the same time, the second will be executed only after the first one is completed).two jobs belonging to the
confirmation-emailgroup in parallelfour jobs belonging to the
double-optin-emailgroup in parallel
$ php vendor/bin/recruiter start:worker --work-on='double-optin-email' --target 127.0.0.1:27017 --bootstrap $APP_BASE_PATH/worker-boostrap.php
$ php vendor/bin/recruiter start:worker --work-on='double-optin-email' --target 127.0.0.1:27017 --bootstrap $APP_BASE_PATH/worker-boostrap.php
$ php vendor/bin/recruiter start:worker --work-on='double-optin-email' --target 127.0.0.1:27017 --bootstrap $APP_BASE_PATH/worker-boostrap.php
$ php vendor/bin/recruiter start:worker --work-on='double-optin-email' --target 127.0.0.1:27017 --bootstrap $APP_BASE_PATH/worker-boostrap.php
$ php vendor/bin/recruiter start:worker --work-on='confirmation-email' --target 127.0.0.1:27017 --bootstrap $APP_BASE_PATH/worker-boostrap.php
$ php vendor/bin/recruiter start:worker --work-on='confirmation-email' --target 127.0.0.1:27017 --bootstrap $APP_BASE_PATH/worker-boostrap.php
$ php vendor/bin/recruiter start:worker --work-on='follow-up-email' --target 127.0.0.1:27017 --bootstrap $APP_BASE_PATH/worker-boostrap.php