diff --git a/.github/workflows/precommit.yml b/.github/workflows/precommit.yml index 270a5d5..e9fc841 100644 --- a/.github/workflows/precommit.yml +++ b/.github/workflows/precommit.yml @@ -5,7 +5,7 @@ permissions: read-all jobs: Run_UT: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -14,7 +14,7 @@ jobs: python3 -m unittest discover -p "*_test.py" ./ Build_Wheel: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -28,7 +28,7 @@ jobs: path: ${{ github.workspace }}/**/*.whl Run_Docker_Tests: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/src/utils/sender.py b/src/utils/sender.py index badab50..5d91be1 100644 --- a/src/utils/sender.py +++ b/src/utils/sender.py @@ -55,10 +55,9 @@ def force_shutdown(self, timeout: float): need_sleep = True if need_sleep: sleep(timeout) - self.executor.shutdown(wait=False) + self.executor.shutdown(wait=False, cancel_futures=True) try: self.executor._threads.clear() - futures.thread._threads_queues.clear() except Exception as err: pass # nosec