Skip to content

Commit

Permalink
Small refactoring __aggregate_container_details method
Browse files Browse the repository at this point in the history
  • Loading branch information
orenlab committed Jun 13, 2024
1 parent 92e3307 commit d0164a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/core/adapters/docker_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ def __aggregate_container_details(self, container_id: str) -> dict:

# Return a dictionary containing the container details
return {
'name': attrs['Name'].title().replace('/', ''),
'name': attrs['Name'].strip("/").title(),
'image': attrs['Config']['Image'],
'created': f'{created_day}, {created_time}',
'created': f"{created_day}, {created_time}",
'mem_usage': self._naturalsize(stats['memory_stats']['usage']),
'run_at': self._naturaltime(datetime.fromisoformat(attrs['State']['StartedAt'])),
'status': attrs['State']['Status'],
Expand Down

0 comments on commit d0164a2

Please sign in to comment.