app/models/taverna_player/run.rb
# Override of Taverna Player method to support versioned workflows
Override of Taverna Player method to support versioned workflows
Override of Taverna Player method to support versioned workflows
def enqueue
      worker = TavernaPlayer::Worker.new(self, executed_workflow.content_blob.data_io_object.path)
      opts = {}
      opts[:queue] = TavernaPlayer.job_queue_name
      if sweep
        opts[:priority] = 2
        last_job = Delayed::Job.order('run_at DESC').where(:queue => TavernaPlayer.job_queue_name).first
        opts[:run_at] = last_job.run_at + 10.seconds if last_job
      end
      job = Delayed::Job.enqueue worker, opts
      update_attributes(:delayed_job => job, :status_message_key => "pending")
    end
def enqueue worker = TavernaPlayer :: Worker . new ( self , executed_workflow . content_blob . data_io_object . path ) opts = { } opts [ :queue ] = TavernaPlayer . job_queue_name if sweep opts [ :priority ] = 2 last_job = Delayed :: Job . order ( 'run_at DESC' ) . where ( :queue => TavernaPlayer . job_queue_name ) . first opts [ :run_at ] = last_job . run_at + 10 . seconds if last_job end job = Delayed :: Job . enqueue worker , opts update_attributes ( :delayed_job => job , :status_message_key => "pending" ) end
Override of Taverna Player method to support versioned workflows
Override of Taverna Player method to support versioned workflows
# De-prioritise sweep runs and space them out so they don't all execute at once and kill Taverna server