meer en beter

This commit is contained in:
Ward Wouts 2009-01-30 14:59:04 +00:00
parent 2269a30107
commit 84776cb511

View file

@ -153,7 +153,18 @@ def master
file.puts "0"
}
# echo 0 >"${basedir}/$runningfile"
#
# while sleep $waittime; do
# if [ $(cat "${basedir}/${runningfile}") -lt $maxproc ]; then
# # via ls omdat anders de globbing klote is
# jl=$(ls ${basedir}/jobs/)
# if [ -n "$jl" ]; then
# ${pbcommand} process &
# fi
# readconfig
# fi
# done
end
def deljob
@ -209,15 +220,35 @@ def unfail
end
def changeprio
puts "unimplemented"
end
def runprocessor
# incrementrunning
# sleep 1
# runjob=$(getjob)
# if [ -n "${runjob}" ]; then
# echo "Starting job: ${runjob}"
# owd=$(pwd)
# cd "${basedir}/processors/${runjob}"
# if "${basedir}/processors/${runjob}/job" 2>&1 > "${basedir}/processors/${runjob}/output" ;then
# finishjob ${runjob}
# echo "Finished job: ${runjob}"
# else
# failjob ${runjob}
# echo "Failed job: ${runjob}"
# fi
# cd $owd
# fi
# decrementrunning
end
def stop
puts "unimplemented"
end
def stopall
puts "unimplemented"
end
pbcommand = $0
@ -232,16 +263,16 @@ case command
when "addfile", "af" then addjobfromfile
when "createconfig" then createconfig
when "run" then master
when "del" then deljob "$*"
when "del" then deljob
when "help" then usage
when "-h" then usage
when "park" then parkjobs
when "unpark" then unparkjobs
when "retry" then unfail "$*"
when "prio" then changeprio "$*"
when "process" then runprocessor "$*"
when "retry" then unfail
when "prio" then changeprio
when "process" then runprocessor
when "status", "st" then status
when "stop" then stop "$*"
when "stop" then stop
when "stopall" then stopall
else usage
end