Currently there's no clean way to interrupt execution of the exporter. In addition, Unit Tests use rather ugly way of interrupting main loop in Exporter.trigger() by passing in special parameter to make sure the loop executes only once.
One of the ways to cleanly shutdown the process could be by handling KeyboardInterupt exception in Exporter.run(). Rough example:
Currently there's no clean way to interrupt execution of the exporter. In addition, Unit Tests use rather ugly way of interrupting main loop in
Exporter.trigger()
by passing in special parameter to make sure the loop executes only once.One of the ways to cleanly shutdown the process could be by handling
KeyboardInterupt
exception inExporter.run()
. Rough example: