summaryrefslogtreecommitdiffstats
path: root/components/pm-subscription-handler/pmsh_service/mod/pmsh_utils.py
diff options
context:
space:
mode:
authoremartin <ephraim.martin@est.tech>2020-03-25 10:05:35 +0000
committeremartin <ephraim.martin@est.tech>2020-03-25 11:38:36 +0000
commit03e058dbd9e298eda2ce4fcb3a5babaf08434cf5 (patch)
treeb3ba5a1251f50cdd369ad22439b8745e0aa6c182 /components/pm-subscription-handler/pmsh_service/mod/pmsh_utils.py
parent8bfed3e53e55f711b1eb7d9cca696b3519658842 (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-xcomponents/pm-subscription-handler/pmsh_service/mod/pmsh_utils.py7
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)