lib/ripe/worker_controller/syncer.rb
def fetch_running_jobs
        lists = {idle: '-i', blocked: '-b', active:  '-r'}
        lists = lists.map do |status, op|
          showq = `showq -u $(whoami) #{op} | grep $(whoami)`.split("\n")
          showq.map do |job|
            {
              moab_id:   job[/^([0-9]+) /, 1],
              time:      job[/  ([0-9]{1,2}(\:[0-9]{2})+)  /, 1],
              status:    status,
            }
          end
        end
        @running_jobs = lists.inject(&:+)
      end
##
# Fetch status for all running jobs.
#
# @return [void]
Fetch status for all running jobs.
Fetch status for all running jobs .
def fetch_running_jobs
        lists = {idle: '-i', blocked: '-b', active:  '-r'}
        lists = lists.map do |status, op|
          showq = `showq -u $(whoami) #{op} | grep $(whoami)`.split("\n")
          showq.map do |job|
            {
              moab_id:   job[/^([0-9]+) /, 1],
              time:      job[/  ([0-9]{1,2}(\:[0-9]{2})+)  /, 1],
              status:    status,
            }
          end
        end
        @running_jobs = lists.inject(&:+)
      end
def fetch_running_jobs lists = { idle : '-i' , blocked : '-b' , active : '-r' } lists = lists . map do | status , op | showq = ` showq -u $(whoami)  #{ op }  | grep $(whoami) ` . split ( "\n" ) showq . map do | job | { moab_id : job [ / ^([0-9]+)  / , 1 ] , time : job [ /   ([0-9]{1,2}( \: [0-9]{2})+)   / , 1 ] , status : status , } end end @running_jobs = lists . inject ( & :+ ) end
Fetch status for all running jobs.
Fetch status for all running jobs .
None
void