finish_task()
- 1 Minute to read
finish_task()
- 1 Minute to read
Article summary
Did you find this summary helpful?
Thank you for your feedback
This method indicates to the fleet that a task was finished, it will show a message and a status.
Reference
Arguments
Arguments | Type | Default value | Description |
---|---|---|---|
result | FLEET_FINISH_STATUS | Status of the task | |
task_id | str | None | Task id generated by the fleet manager |
message | str | None | Message to show on the fleet manager status |
See the complete list of fleet enumerations
Return
None
Exceptions
TypeError
See the complete list of fleet exceptions
Usage Example
from raya.application_base import RayaApplicationBase
from raya.controllers.fleet_controller import FleetController
from raya.enumerations import FLEET_UPDATE_STATUS
class RayaApplication(RayaApplicationBase):
async def setup(self):
self.fleet: FleetController = await self.enable_controller('fleet')
async def loop(self):
self.finish_app()
async def finish(self):
await self.fleet.finish_task(
result=FLEET_FINISH_STATUS.SUCCESS,
message='finish ok'
)
In the fleet manager you should see this on the task details.
Was this article helpful?