The queue is "/queues/sched/$queue/ready/$subqueue/$id", $subqueue is the email, so we should get the 5 index when split by "/".
Signed-off-by: Cao Xueliang caoxl78320@163.com --- src/scheduler/find_job_boot.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/scheduler/find_job_boot.cr b/src/scheduler/find_job_boot.cr index 99c577f..4f49394 100644 --- a/src/scheduler/find_job_boot.cr +++ b/src/scheduler/find_job_boot.cr @@ -117,7 +117,7 @@ class Sched def split_jobs_by_email(jobs) hash = Hash(String, Array(Etcd::Model::Kv)).new jobs.each do |job| - key = job.key.split("/")[4] + key = job.key.split("/")[5] if hash.has_key?(key) hash[key] << job else