2013-04-02 3 views
8

나는 sidekiq-limit_fetch 보석을 사용하여 대기열 당 작업자 수를 제한하려고 시도했습니다. Sidekiq은 로그에서 부과 된 제한을 "확인"하는 것으로 보이지만 작업자를 볼 때 한도는 무시됩니다.Sidekiq의 대기열 당 작업자 제한

2013-04-02T05:47:19Z 748 TID-11ilcw DEBUG: {:queues=> 
    ["recommendvariations", 
    "recommendvariations", 
    "recommendvariations", 
    "recommendphenotypes", 
    "recommendphenotypes", 
    "recommendphenotypes", 
    "preparse", 
    "preparse", 
    "preparse", 
    "parse", 
    "parse", 
    "parse", 
    "zipgenotyping", 
    "zipgenotyping", 
    "zipfulldata", 
    "deletegenotype", 
    "fitbit", 
    "frequency", 
    "genomegov", 
    "mailnewgenotype", 
    "mendeley_details", 
    "mendeley", 
    "pgp", 
    "plos_details", 
    "plos", 
    "snpedia", 
    "fixphenotypes"], 
    :concurrency=>5, 
    :require=>".", 
    :environment=>"production", 
    :timeout=>8, 
    :profile=>false, 
    :verbose=>true, 
    :pidfile=>"/tmp/sidekiq.pid", 
    :logfile=>"./log/sidekiq.log", 
    :limits=> 
    {"recommendvariations"=>1, 
    "recommendphenotypes"=>1, 
    "preparse"=>2, 
    "parse"=>2, 
    "zipgenotyping"=>1, 
    "zipfulldata"=>1, 
    "fitbit"=>3, 
    "frequency"=>10, 
    "genomegov"=>1, 
    "mailnewgenotype"=>1, 
    "mendeley_details"=>1, 
    "mendeley"=>1, 
    "pgp"=>1, 
    "plos_details"=>1, 
    "plos"=>1, 
    "snpedia"=>1, 
    "fixphenotypes"=>1}, 
    :strict=>false, 
    :config_file=>"config/sidekiq.yml", 
    :tag=>"snpr"} 

here's the sidekiq.yml : Sidekiq이 한계를 보는 곳

다음은 로그에서 부분입니다. sidekiq의 웹 인터페이스를 보면 한계가 무시됩니다. 지금 당장에는 "권장 사항"항목에 2 명의 작업자가 있습니다.하지만 1이어야합니다.

bundle exec sidekiq -e production -C config/sidekiq.yml 이상의 작업을 시작합니다.

누구도이 문제가 발생 했습니까?

답변

4

sidekiq.rb 초기화 파일에 한계를 설정하려고 했습니까? 이처럼

는 :

Sidekiq::Queue['recommend'].limit = 1 

그것은 나를 위해 일했습니다.

+0

제대로 작동하지만, 이전 버전의 bundler를 설치했기 때문에 (1.0.21) 고정되어 있습니다. – Philipp

+0

특정 대기열에 대해이 작업을 수행 할 수 있습니까? – aks