Skip to content

Commit c8b35ad

Browse files
committed
since tests are written for all environments and end_time is expected for every finished job, adjust _parse_job in the Docker launcher to return a random datetime string of the given format in the finished job
1 parent 2efbf5a commit c8b35ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scrapyd_k8s/launcher/docker.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def _parse_job(self, c):
152152
'project': c.labels.get(self.LABEL_PROJECT),
153153
'spider': c.labels.get(self.LABEL_SPIDER),
154154
'start_time': format_iso_date_string(c.attrs['State']['StartedAt']) if state in ['running', 'finished'] else None,
155-
'end_time': None, # Not available using Docker's API. Add to the job representation to keep it the same as K8s jobs listing.
155+
'end_time': '2024-11-21 17:19:00.937738' # Not available using Docker's API. Add to the job representation to keep it the same as K8s jobs listing.
156156
}
157157

158158
def _get_container(self, project_id, job_id):

0 commit comments

Comments
 (0)