Method: Quorum::JobQueueService.queue_search_workers
- Defined in:
- app/models/quorum/job_queue_service.rb
.queue_search_workers(job) ⇒ Object
Queue search workers.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'app/models/quorum/job_queue_service.rb', line 7 def self.queue_search_workers(job) blast_jobs = [] if job.blastn_job && job.blastn_job.queue blast_jobs << Workers::System.create_search_command("blastn", job.id) end if job.blastx_job && job.blastx_job.queue blast_jobs << Workers::System.create_search_command("blastx", job.id) end if job.tblastn_job && job.tblastn_job.queue blast_jobs << Workers::System.create_search_command("tblastn", job.id) end if job.blastp_job && job.blastp_job.queue blast_jobs << Workers::System.create_search_command("blastp", job.id) end unless blast_jobs.blank? blast_jobs.each do |b| Workers::System.enqueue( b, Quorum.blast_remote, Quorum.blast_ssh_host, Quorum.blast_ssh_user, Quorum. ) end end end |