diff options
Diffstat (limited to 'components/pm-subscription-handler/pmsh_service/mod/exit_handler.py')
-rwxr-xr-x | components/pm-subscription-handler/pmsh_service/mod/exit_handler.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/components/pm-subscription-handler/pmsh_service/mod/exit_handler.py b/components/pm-subscription-handler/pmsh_service/mod/exit_handler.py index aed86307..1ea83e59 100755 --- a/components/pm-subscription-handler/pmsh_service/mod/exit_handler.py +++ b/components/pm-subscription-handler/pmsh_service/mod/exit_handler.py @@ -1,5 +1,5 @@ # ============LICENSE_START=================================================== -# Copyright (C) 2020 Nordix Foundation. +# Copyright (C) 2020-2021 Nordix Foundation. # ============================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -39,10 +39,7 @@ class ExitHandler: def __call__(self, sig_num, frame): logger.info('Graceful shutdown of PMSH initiated.') logger.debug(f'ExitHandler was called with signal number: {sig_num}.') - for thread in self.periodic_tasks: - if thread.name == 'aai_event_thread': - logger.info(f'Cancelling thread {thread.name}') - thread.cancel() + self.subscription_handler.stop_aai_event_thread() current_sub = self.app_conf.subscription if current_sub.administrativeState == AdministrativeState.UNLOCKED.value: try: |