request_action()
- 1 Minute to read
request_action()
- 1 Minute to read
Article summary
Did you find this summary helpful?
Thank you for your feedback
Opens a window on the fleet manager to ask for an action from a person.
Reference
Arguments
Arguments | Type | Default value | Description |
---|---|---|---|
title | str | Title to show on the window | |
message | str | Message to show on the window | |
task_id | str | None | Task id generated by the fleet manager |
timeout | float | 30.0 | Timeout to wait for a response, if there is no response raise RayaFleetTimeout |
Return
dict
Exceptions
RayaFleetWrongValue
RayaFleetTimeout
See the complete list of fleet exceptions
Usage Example
from raya.application_base import RayaApplicationBase
from raya.controllers.fleet_controller import FleetController
class RayaApplication(RayaApplicationBase):
async def setup(self):
self.fleet: FleetController = await self.enable_controller('fleet')
async def loop(self):
response = await self.fleet.request_action(
title='Move to target',
message='Gary wants to move to the target',
timeout=120.0
)
self.log.info(response)
self.finish_app()
async def finish(self):
pass
Was this article helpful?