BritishGeologicalSurvey / etlhelper

ETL Helper is a Python ETL library to simplify data transfer into and out of databases.
https://britishgeologicalsurvey.github.io/etlhelper/
GNU Lesser General Public License v3.0
104 stars 25 forks source link

Abort function #137

Closed volcan01010 closed 1 year ago

volcan01010 commented 1 year ago

Description

This pull request adds an abort_etlhelper_threads() function that allows jobs to be cancelled from other threads. This is useful for GUI applications that use ETLHelper. It closes #124.

To test

The abort code is relatively simple and the test code is actually more tricky. It needs to use the ThreadPoolExecutor to run the jobs and capture exceptions that they raise. They comments and description should make sense, but please modify if they don't.