Skip to content

Commit

Permalink
remove duplicate 'str()' converting and update docs to include PULLIN…
Browse files Browse the repository at this point in the history
…G status
  • Loading branch information
fregataa committed Nov 22, 2024
1 parent 51232b8 commit 10c0c18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/locales/ko/LC_MESSAGES/client/cli/sessions.po
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ msgstr ""

#: ../../client/cli/sessions.rst:42 4f067c02b259464f84aeade4874f054f
msgid ""
"``PENDING``, ``PREPARING``, ``PREPARED``, ``CREATING``, ``RUNNING``, ``RESTARTING``, ``TERMINATING``,"
"``PENDING``, ``PREPARING``, `PULLING`, ``PREPARED``, ``CREATING``, ``RUNNING``, ``RESTARTING``, ``TERMINATING``,"
" ``RESIZING``, ``SUSPENDED``, and ``ERROR``."
msgstr ""

Expand Down
6 changes: 3 additions & 3 deletions src/ai/backend/agent/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ async def _pull(reporter: ProgressReporter, *, img_conf: ImageConfig) -> None:
)
)
except Exception as e:
log.exception(f"Image pull failed (img:{str(img_ref)},e:{repr(e)})")
log.exception(f"Image pull failed (img:{img_ref}, e:{repr(e)})")
await self.agent.produce_event(
ImagePullFailedEvent(
image=str(img_ref),
Expand All @@ -546,15 +546,15 @@ async def _pull(reporter: ProgressReporter, *, img_conf: ImageConfig) -> None:
)
)
else:
log.info(f"Image pull succeeded {str(img_ref)}")
log.info(f"Image pull succeeded {img_ref}")
await self.agent.produce_event(
ImagePullFinishedEvent(
image=str(img_ref),
agent_id=self.agent.id,
)
)
else:
log.debug(f"No need to pull image {str(img_ref)}")
log.debug(f"No need to pull image {img_ref}")
await self.agent.produce_event(
ImagePullFinishedEvent(
image=str(img_ref),
Expand Down

0 comments on commit 10c0c18

Please sign in to comment.