Skip to content
Snippets Groups Projects
Commit 28a18e9f authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

Task #8887: check for keys in dict. subscibe to proper pg notification

parent 412c5367
No related branches found
No related tags found
No related merge requests found
......@@ -56,8 +56,8 @@ class RADBPGListener(PostgresListener):
# so subscribe to specification_update, and use task_view as view_for_row
self.subscribe('specification_update_with_task_view', self.onSpecificationUpdated)
self.subscribe('resource_claim_update', self.onResourceClaimUpdated)
self.subscribe('resource_claim_insert', self.onResourceClaimInserted)
self.subscribe('resource_claim_update_with_resource_claim_view', self.onResourceClaimUpdated)
self.subscribe('resource_claim_insert_with_resource_claim_view', self.onResourceClaimInserted)
self.subscribe('resource_claim_delete', self.onResourceClaimDeleted)
def onTaskUpdated(self, payload = None):
......@@ -104,6 +104,7 @@ class RADBPGListener(PostgresListener):
if state in contentDict:
for field in fields:
try:
if field in contentDict[state]:
timestampStr = contentDict[state][field]
if timestampStr.rfind('.') > -1:
timestamp = datetime.strptime(timestampStr, '%Y-%m-%d %H:%M:%S.%f')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment