From f76764119dc14b7c174599bb0bf32c485e0b9332 Mon Sep 17 00:00:00 2001 From: alex-hancock Date: Fri, 26 May 2017 12:43:03 -0700 Subject: [PATCH 1/2] Edited format of timestamp for created and last updated. --- luigi-interface/monitor.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/luigi-interface/monitor.py b/luigi-interface/monitor.py index f020a54..ff77687 100644 --- a/luigi-interface/monitor.py +++ b/luigi-interface/monitor.py @@ -220,8 +220,9 @@ def get_consonance_status(consonance_uuid): where(luigi.c.luigi_job == job_name) exec_result = conn.execute(stmt) else: + # DEBUG # Consonace job id is real - #print "\nJOB NAME:", job_uuid + # print "\nJOB NAME:", job_uuid status_json = get_consonance_status(job_uuid) @@ -229,6 +230,19 @@ def get_consonance_status(consonance_uuid): created = status_json['create_timestamp'] updated = status_json['update_timestamp'] + # Timestamp format: 2017-03-10T18:37:06.230+0000 + # Date = str[:10] to get only YYYY-MM-DD + create_date = created[:10] + update_date = updated[:10] + + # Time = str[11:16] shaves the timestamp + # to just hours and minutes + create_time = created[11:16] + update_time = updated[11:16] + + created = created_date + " " + created_time + updated = updated_date + " " + updated_time + # DEBUG to check if state, created, and updated are collected #print "STATE:", state #print "CREATED:", created From 697963e87318db86ef944a4c18f134134875a1ab Mon Sep 17 00:00:00 2001 From: caaespin Date: Thu, 1 Jun 2017 03:55:19 +0000 Subject: [PATCH 2/2] Typo variable --- luigi-interface/monitor.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/luigi-interface/monitor.py b/luigi-interface/monitor.py index ff77687..754d2a5 100644 --- a/luigi-interface/monitor.py +++ b/luigi-interface/monitor.py @@ -232,13 +232,13 @@ def get_consonance_status(consonance_uuid): # Timestamp format: 2017-03-10T18:37:06.230+0000 # Date = str[:10] to get only YYYY-MM-DD - create_date = created[:10] - update_date = updated[:10] + created_date = created[:10] + updated_date = updated[:10] # Time = str[11:16] shaves the timestamp # to just hours and minutes - create_time = created[11:16] - update_time = updated[11:16] + created_time = created[11:16] + updated_time = updated[11:16] created = created_date + " " + created_time updated = updated_date + " " + updated_time