R
R
runprogr2021-02-27 10:17:25
Laravel
runprogr, 2021-02-27 10:17:25

How to get running jobs?

Queues work on redis.
There is a queue "cache_master_1". You need to get all the jobs that are currently running.
The query returns such keys
Redis::KEYS('*queue*')

queues:cache_master_1:notify
queues:cache_master_1
queues:cache_master_1:reserved

In queues:cache_master_1 , as far as I understand, are all jobs that are waiting for their turn
In queues:cache_master_1:reserved , as far as I understand, all jobs that are running now should be in queues:cache_master_1:reserved ,
but
Redis::lrange('queues:cache_master_1:reserved', 0, -1)

returns (bool) false in response.
Why doesn't it return a list of jobs? How to properly extract rederved jobs from a radish?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
runprogr, 2021-02-27
@runprogr

Understood
Executable jobs have a different type of list in radish. They can be obtained through

Redis::zrange('queues:cache_master_1:reserved', 0, -1)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question