There is no exception handling during recovery mode to capture things such as the user interrupt. The following options could be done:
-
The same code that handles this behaviour in the longbowmain method could be implemented in the recovery method. This could allow a deviation in intended behaviour of the interrupt signal between normal operating mode and recovery mode.
-
The code from longbowmain method could simply be moved up a level to the main method and then cover both longowmain and recovery methods. Although there will need to be a way of passing the jobs data structure up the chain as it is not currently in the namespace. This could be done either by declaring an empty dict in the namespace and passing it down to be initialised, or find a way to append it to the exception and pull it out where needed.