% % hand task over to vms % "present_*.txt" !wilder empty ofxone "rdyofx" log)( empty { nextfile ? "preslock" log)( /* dup "_" 1 1 1 parse 1 left "D" eq$ { _dropout "droplock" log)( } { _dropout not "buildlock" log)( } ifelse { */ % % this vm is marked present % check for its ready marker waiting % dup noext "_" 1 1 1 parse "ready_" &2 text ofxone exists { % % stack: pres-dir pres-seed pres-locker % % ready flag is there % "busy_" &2 text ofxone exists "busylock" log)( { % % this builder is still marked as busy % % stack: pres-dir pres-seed pres-locker % pop false } { % % stack: pres-dir pres-seed pres-locker % % is anyone else assigned this xact % true !allow "assign_?????_" &_Xact text !wilder empty ofxone empty { nextfile ? "alreadyassign" log)( false !allow true ? } loop filing) _allow "lockcan" log)( { % % builder can be assigned this xact % % stack: pres-dir pres-seed pres-locker % _Xact &" !Build.Xact" catcr "busy_" &3 text ofxone "xonelock" log)( write % % copy the original phase.txt to vms state % "Anchor.txt" ofxact "Anchor_" &3 text ofxact copyfile "phase.txt" ofxact "phase_" &3 text ofxact copyfile "incoming.txt" ofxact "incoming_" &3 text ofxact copyfile "phase.txt" ofxact ".mov" overext "phase.txt" ofxact exists "stillex" log)( pop _Xact &" !Build.Xact" catcr "assign_" &3 &"_" &_Xact text ofxone "assignlock" log)( write % % stack: pres-dir pres-seed pres-locker % pop true } { % % stack: pres-dir pres-seed pres-locker % % this builder cannot be assigned % pop false } ifelse } ifelse } { % % stack: pres-dir pres-seed pres-locker % % no ready flag % pop false } ifelse /* } { % % stack: pres-dir pres-seed % % this vm not present % false } ifelse */ "assigner" log)( ? "present_*.txt" !wilder } loop filing)