Skip to content

Commit

Permalink
Merge pull request #913 from UCL-INGI/container_created_time
Browse files Browse the repository at this point in the history
[docker_agent] fix container timestamp for docker 23+
  • Loading branch information
nrybowski committed Feb 28, 2023
2 parents 6e4f025 + 3de90fb commit 9f645aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion inginious/agent/docker_agent/_docker_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def get_containers(self, runtimes: List[DockerRuntime]) -> Dict[str, Dict[str, D
title = None
try:
title = x.labels["org.inginious.grading.name"]
created = datetime.strptime(x.attrs['Created'][:-4], "%Y-%m-%dT%H:%M:%S.%f").timestamp()
created = x.history()[0]['Created']
ports = [int(y) for y in x.labels["org.inginious.grading.ports"].split(
",")] if "org.inginious.grading.ports" in x.labels else []

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from setuptools import setup, find_packages

install_requires = [
"docker>=2.5.0",
"docker>=3.0",
"docutils>=0.14",
"pymongo>=3.2.2",
"PyYAML>=3.11",
Expand Down

0 comments on commit 9f645aa

Please sign in to comment.