Wrap the whole try/except in a git checkpoint.
Moving change finding code into the taskstore itself.
Adding checkpoint messages and IDs for debugging.
Force a synchronization to delay momentarily to allow task a chance to move entries from pending to completed.