dmwm/AsyncStageout — pull request #4339 by TonyWildish (2014-12-18 17:29:04+00:00)
Title: Attempt a better fix for #4311

- put back the (Source,Destination) transposition, that was correct and harmless

- put back the pushing of files to the UNLINK array, but rename the files first.
Now when the input directory is read they will not be picked up

- caveat: add a STARTING flag to the constructor, to the first time it scans
the input directory it knows to look for the renamed files

This is needed to make sure that monitoring jobs are not lost if the Monitor
is killed between a job finishing and the Reporter being notified. The completed
monitoring report stays on disk until the Monitor is restarted, then it is reported,
and everything should be fine.

That's the theory, I haven't actually tested the code!