I find out the solution and it helpful for me
Resque.delayed_queue_peek(1, 20)
# Result : ["1727744400", "1727780400", "1728379910", "1728381061", "1728381063", "1728381750", "1728383426", "1728391401", "1728391426", "1730320200", "1731148380", "1737030600"]
scheduled_timestamps = Resque.redis.zrange('delayed_queue_schedule', 0, -1)
# result ["1727744400", "1727780400", "1728379910", "1728381061", "1728381063", "1728381750", "1728383426", "1728391401", "1728391426", "1730320200", "1731148380", "1737030600"]
scheduled_jobs = scheduled_timestamps.map do |timestamp|
Resque.redis.lrange("delayed:#{timestamp}", 0, -1)
end
# result [["{\"class\":\"CompanyEnqueSnapshotsJob\",\"args\":[1,\"2024-10-01\"],\"queue\":\"snapshots\"}"]...
scheduled_jobs.flatten.each do |job|
puts job
end
{"class":"CompanyEnqueSnapshotsJob","args":[1,"2024-10-01"],"queue":"snapshots"}
Thank you