Batch - ensure that logs are posted in chronological order (#4710)
This commit is contained in:
parent
0bc45963da
commit
80e3b3574d
@ -618,6 +618,7 @@ class Job(threading.Thread, BaseModel, DockerModel):
|
||||
)
|
||||
date = unix_time_millis(date_obj)
|
||||
logs.append({"timestamp": date, "message": line.strip()})
|
||||
logs = sorted(logs, key=lambda l: l["timestamp"])
|
||||
|
||||
# Send to cloudwatch
|
||||
log_group = "/aws/batch/job"
|
||||
|
Loading…
Reference in New Issue
Block a user