Skip to content

jk-es335/solid-queue-hands-on

Repository files navigation

README

How to run queuing process

solid queue

make up_sq

multiple workers/dispatchers

make up_sq_all

if you want to increase workers,

make WORKER=4 up_sq_all 

delayed job

make up_dj

multiple processes

make up_dj_all

if you want to increase workers,

make WORKER=4 up_dj_all 

Enqueue jobs

docker compose exec app bash -c 'bundle exec rake sample_job:run[500]'

docker compose exec app bash -c 'bundle exec rake fake_api_job:run[500]'

Check the processing time

docker compose exec db bash -c 'mysql handson'

Run the following SQL queries

SELECT adapter, uuid, count(id) AS queue, TIMEDIFF(MAX(completed_at), MIN(completed_at)) AS duration FROM job_completions GROUP BY adapter, uuid;

SELECT adapter, uuid, DATE_FORMAT(completed_at, '%Y-%m-%d %H:%i:%s') as datetime, count(id) AS queue, TIMEDIFF(MAX(completed_at), MIN(completed_at)) AS duration FROM job_completions GROUP BY adapter, uuid, datetime;

Check the status of the jobs (for solid queue)

https://localhost:13000/jobs

How to destroy the containers

make down