% % already flagged for processing % "ready_" textwild empty ofxact "rdyofx" log)( empty { nextfile ? "readyxact" log)( dup noext "_" 1 1 1 parse "readylock" log)( % % check if already busy with another task % "xact1\busy_" &2 text ofsnap exists "busylock" log)( { % % this builder is still marked as busy % false } { % % builder can be assigned this xact % _Xact &" !Build.Xact" catcr "xact1\busy_" &3 text ofsnap "onelock" log)( write _Xact &" !Build.Xact" catcr "xact1\" &3 &"_" &_Xact text ofsnap "assignlock" log)( write true } ifelse pop2nd ? } loop filing) "assigner" log# "?????_" &_Xact text !wilder "xact1\" ofsnap empty { nextfile ? "xactlokr" log)( dup noext "_" 0 1 1 parse % % see if the builder removed the ready signal from the xact % "ready_" &2 text ofxact "ckready" log)( exists "ckexist" log)( { % % still busy with this xact % pop } { % % finished with this xact % remove the locker xact entry % and the flag signal and the busy signal % "flag.txt" ofxact del dup ^"busy_" text ^4 "busyends" log)( del ^"phase_" text ofxact "newphase" log)( "phase.txt" ofxact copyfile xactphase _Camera.Phase "Post" eq$ { "phase.txt" ofxact ".xtx" overext } if filing "filingready" log)( del } ifelse } loop filing)