diff options
author | 2021-01-13 16:12:57 +0000 | |
---|---|---|
committer | 2021-01-26 16:47:26 +0000 | |
commit | f7be006e7cc638788164fb1028d03898138b8c16 (patch) | |
tree | 253d460ca148495d31203b9038b1e24ec209d7e9 /components/pm-subscription-handler/pmsh_service/mod/exit_handler.py | |
parent | 2510fa240ca7395ff8a36762d5892413ab05fd68 (diff) |
[PMSH] Update sub object on activate
Signed-off-by: efiacor <fiachra.corcoran@est.tech>
Change-Id: Id9418301e0cb4d373339b9b3e3476f7db5770f3e
Issue-ID: DCAEGEN2-2152
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: |