lib/ripe/worker_controller/syncer.rb
##
# Update the status of running workers from the running jobs.
#
# @return [void]
Update the status of running workers from the running jobs.
Update the status of running workers from the running jobs .
def update_running_workers
        workers = @running_jobs.map do |job|
          worker = DB::Worker.find_by(moab_id: job[:moab_id])
          if worker
            worker.update(time: job[:time])
            unless ['cancelled', job[:status]].include?(worker.status)
              checkjob = `checkjob #{job[:moab_id]}`
              worker.update({
                host:      checkjob[/Allocated Nodes:\n\[(.*):[0-9]+\]\n/, 1],
                status:    job[:status],
              })
            end
          end
          worker 
        end
        @workers += workers.compact
      end
def update_running_workers workers = @running_jobs . map do | job | worker = DB :: Worker . find_by ( moab_id : job [ :moab_id ] ) if worker worker . update ( time : job [ :time ] ) unless [ 'cancelled' , job [ :status ] ] . include? ( worker . status ) checkjob = ` checkjob  #{ job [ :moab_id ] } ` worker . update ( { host : checkjob [ / Allocated Nodes: \n \[ (.*):[0-9]+ \] \n / , 1 ] , status : job [ :status ] , } ) end end worker end @workers += workers . compact end
Update the status of running workers from the running jobs.
Update the status of running workers from the running jobs .
# Queued jobs that appear become either idle, blocked or active # This is +nil+ if worker is not found (other running jobs # that are independent from the current ripe repo).
None
void