diff options
author | 2020-03-25 10:05:35 +0000 | |
---|---|---|
committer | 2020-03-25 11:38:36 +0000 | |
commit | 03e058dbd9e298eda2ce4fcb3a5babaf08434cf5 (patch) | |
tree | b3ba5a1251f50cdd369ad22439b8745e0aa6c182 /components/pm-subscription-handler/pmsh_service/mod/pmsh_utils.py | |
parent | 8bfed3e53e55f711b1eb7d9cca696b3519658842 (diff) |
Handle graceful exit of PMSH1.0.2
Issue-ID: DCAEGEN2-1832
Change-Id: If0362e1927f7013d25f0cf23ade5ce9d2bdea8e3
Signed-off-by: emartin <ephraim.martin@est.tech>
Diffstat (limited to 'components/pm-subscription-handler/pmsh_service/mod/pmsh_utils.py')
-rwxr-xr-x | components/pm-subscription-handler/pmsh_service/mod/pmsh_utils.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/components/pm-subscription-handler/pmsh_service/mod/pmsh_utils.py b/components/pm-subscription-handler/pmsh_service/mod/pmsh_utils.py index 1fc3a097..750b7211 100755 --- a/components/pm-subscription-handler/pmsh_service/mod/pmsh_utils.py +++ b/components/pm-subscription-handler/pmsh_service/mod/pmsh_utils.py @@ -17,10 +17,12 @@ # ============LICENSE_END===================================================== import uuid +from threading import Timer + import requests -import mod.pmsh_logging as logger from requests.auth import HTTPBasicAuth -from threading import Timer + +import mod.pmsh_logging as logger class AppConfig: @@ -180,5 +182,6 @@ class PeriodicTask(Timer): """ def run(self): + self.function(*self.args, **self.kwargs) while not self.finished.wait(self.interval): self.function(*self.args, **self.kwargs) |