finish_task()¶
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 |
|
Status of the task |
|
task_id |
|
None |
Task id generated by the fleet manager |
message |
|
None |
Message to show on the fleet manager status |
Return¶
None
Exceptions¶
TypeError
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.