cylc/cylc — pull request #553 by benfitzpatrick (2013-07-02 16:52:51+00:00)
Title: cylc trigger - fix for duplicate submission

This follows on from #551, which only addressed problems with cylc trigger in simulation mode.

When a few tasks are triggered nearly at once, there can be a delay before the `batch_submitter` `task_batcher` thread resets the `manual_trigger` attribute in the task by calling the task `submit` method - this delay can be enough to allow it to resubmit the task (still has a `True` `manual_trigger`) again on the next pass through the `task_pool.py` `process` loop. This moves the `manual_trigger` unsetting step outside the particular batch submitting thread so that there should not be problems with the delay.

@arjclark, please review.