Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: shadeofblue <[email protected]>
  • Loading branch information
johny-b and shadeofblue authored Sep 14, 2021
1 parent ea1a857 commit 65fdb30
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions examples/simple-service-poc/simple_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ async def get_payload():

async def start(self):
# handler responsible for starting the service
self._ctx.deploy()
self._ctx.start()
async for script in super().start():
yield script
self._ctx.run(self.SIMPLE_SERVICE_CTL, "--start")
yield self._ctx.commit()

Expand Down
4 changes: 2 additions & 2 deletions tests/goth_tests/test_instance_restart/requestor.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ async def start(self):

global instances_started

self._ctx.deploy()
self._ctx.start()
async for script in super().start():
yield script

self._ctx.run("/bin/echo", "STARTING", str(instances_started + 1))
future_results = yield self._ctx.commit()
Expand Down
6 changes: 3 additions & 3 deletions yapapi/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,11 @@ async def start(self):
Therefore, this default implementation performs the minimum required for a VM payload to
start responding to `run` commands. If your service requires any additional operations -
you'll need to override this method (possibly starting with yielding everything yielded by
`super().start()`) to add appropriate preparatory steps.
you'll need to override this method (possibly first yielding from the parent - `super().start()` - generator )
to add appropriate preparatory steps.
In case of runtimes other than VM, `deploy` and/or `start` might be optional or altogether
disallowed, plus `deploy`/`start` itself might take some parameters. It is up to the author of the
disallowed, plus `deploy`/`start` themselves may take some parameters. It is up to the author of the
specific `Service` implementation that uses such a payload to adjust this method accordingly
based on the requirements for the given runtime/exe-unit type.
"""
Expand Down

0 comments on commit 65fdb30

Please sign in to comment.