From dd6b62d73c6ab0ef028711258e2edb141c1ba81a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herman=20Zvonimir=20Do=C5=A1ilovi=C4=87?= Date: Mon, 6 Jan 2020 02:28:20 +0100 Subject: [PATCH] Use queue which corresponds to the current version. --- app/jobs/isolate_job.rb | 2 +- scripts/run-workers | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/jobs/isolate_job.rb b/app/jobs/isolate_job.rb index 2187bef0..055140fb 100644 --- a/app/jobs/isolate_job.rb +++ b/app/jobs/isolate_job.rb @@ -1,5 +1,5 @@ class IsolateJob < ApplicationJob - queue_as :default + queue_as ENV["JUDGE0_VERSION"].to_sym STDIN_FILE_NAME = "stdin.txt" STDOUT_FILE_NAME = "stdout.txt" diff --git a/scripts/run-workers b/scripts/run-workers index 00f823e7..1cc37757 100755 --- a/scripts/run-workers +++ b/scripts/run-workers @@ -17,7 +17,7 @@ trap exit_gracefully SIGTERM SIGINT mkdir -p tmp/pids &> /dev/null while [[ $run_resque -eq 1 ]]; do rm -rf tmp/pids/resque.pid &> /dev/null - COUNT=${COUNT:-1} rails resque:workers & + COUNT=${COUNT:-1} QUEUE=$JUDGE0_VERSION rails resque:workers & resque_pid=$! while ps -p $resque_pid > /dev/null; do sleep 1s; done done