Linting
This commit is contained in:
parent
bb5a54ca4b
commit
1b031aeeb0
@ -342,8 +342,8 @@ class Job(threading.Thread, BaseModel):
|
||||
"status": self.job_state,
|
||||
"dependsOn": [],
|
||||
}
|
||||
if result['status'] not in ['SUBMITTED', 'PENDING', 'RUNNABLE', 'STARTING']:
|
||||
result['startedAt'] = datetime2int(self.job_started_at)
|
||||
if result["status"] not in ["SUBMITTED", "PENDING", "RUNNABLE", "STARTING"]:
|
||||
result["startedAt"] = datetime2int(self.job_started_at)
|
||||
if self.job_stopped:
|
||||
result["stoppedAt"] = datetime2int(self.job_stopped_at)
|
||||
result["container"] = {}
|
||||
@ -506,7 +506,9 @@ class Job(threading.Thread, BaseModel):
|
||||
date, line = line.split(" ", 1)
|
||||
date = dateutil.parser.parse(date)
|
||||
# TODO: Replace with int(date.timestamp()) once we yeet Python2 out of the window
|
||||
date = int((time.mktime(date.timetuple()) + date.microsecond / 1000000.0))
|
||||
date = int(
|
||||
(time.mktime(date.timetuple()) + date.microsecond / 1000000.0)
|
||||
)
|
||||
logs.append({"timestamp": date, "message": line.strip()})
|
||||
|
||||
# Send to cloudwatch
|
||||
|
@ -682,6 +682,7 @@ def test_submit_job_by_name():
|
||||
|
||||
# SLOW TESTS
|
||||
|
||||
|
||||
@mock_logs
|
||||
@mock_ec2
|
||||
@mock_ecs
|
||||
@ -745,7 +746,7 @@ def test_submit_job():
|
||||
resp = logs_client.get_log_events(
|
||||
logGroupName="/aws/batch/job", logStreamName=ls_name
|
||||
)
|
||||
[event['message'] for event in resp["events"]].should.equal(['hello'])
|
||||
[event["message"] for event in resp["events"]].should.equal(["hello"])
|
||||
|
||||
|
||||
@mock_logs
|
||||
|
Loading…
x
Reference in New Issue
Block a user