지연된 작업을 사용할 때 특정 대기열에 대해 하나의 작업자를 지정하려면 어떻게합니까?지연된 작업의 대기열에 하나의 작업자를 지정하는 방법
# Use the --pool option to specify a worker pool. You can use this option
# multiple times to start different numbers of workers for different queues.
# The following command will start 1 worker for the tracking queue,
# 2 workers for the mailers and tasks queues, and 2 workers for any jobs:
RAILS_ENV=production script/delayed_job --pool=tracking --pool=mailers,tasks:2 --pool=*:2 start
그러나 우리에게 Heroku를 사용하고 있기 때문에 우리는 우리의 노동자를 실행하는 procfile을 사용하고 있습니다 :
worker_1: bundle exec rake jobs:work
worker_2: bundle exec rake jobs:work
:
worker: bundle exec foreman start -f Procfile.workers
우리 노동자 파일은 작업을 실행 내가이 명령을 실행할 수 있습니다 알고
은 내가 그러나 할 걸려 뭔가 같은 :
bundle exec rake jobs:work --queue=specific_queue
및 O specific_queue를 작업하는 한 명의 작업자와 다른 대기열에서 작업하는 다른 작업자가 있어야합니다.
어떻게하면됩니까? 당신에게 Heroku의 Process Types and the Procfile
문서를 살펴 경우
내 답변이 도움이 되었습니까? –