Skip to content
This repository was archived by the owner on Dec 5, 2018. It is now read-only.

Commit 786f4e8

Browse files
authored
Merge pull request #15 from BD2KGenomics/feature/date-time-partition
Edited format of timestamp for created and last updated.
2 parents 4309da5 + 697963e commit 786f4e8

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

luigi-interface/monitor.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,15 +220,29 @@ def get_consonance_status(consonance_uuid):
220220
where(luigi.c.luigi_job == job_name)
221221
exec_result = conn.execute(stmt)
222222
else:
223+
# DEBUG
223224
# Consonace job id is real
224-
#print "\nJOB NAME:", job_uuid
225+
# print "\nJOB NAME:", job_uuid
225226

226227
status_json = get_consonance_status(job_uuid)
227228

228229
state = status_json['state']
229230
created = status_json['create_timestamp']
230231
updated = status_json['update_timestamp']
231232

233+
# Timestamp format: 2017-03-10T18:37:06.230+0000
234+
# Date = str[:10] to get only YYYY-MM-DD
235+
created_date = created[:10]
236+
updated_date = updated[:10]
237+
238+
# Time = str[11:16] shaves the timestamp
239+
# to just hours and minutes
240+
created_time = created[11:16]
241+
updated_time = updated[11:16]
242+
243+
created = created_date + " " + created_time
244+
updated = updated_date + " " + updated_time
245+
232246
# DEBUG to check if state, created, and updated are collected
233247
#print "STATE:", state
234248
#print "CREATED:", created

0 commit comments

Comments
 (0)