Skip to content

Commit

Permalink
Increase queue for beacon and doors (#972)
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Chong <[email protected]>
(cherry picked from commit c7ec958)
Signed-off-by: Aaron Chong <[email protected]>
  • Loading branch information
aaronchongth committed Jul 22, 2024
1 parent 2a2f76d commit eecd101
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions packages/api-server/api_server/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ async def save(door_state: DoorState):
RmfDoorState,
"door_states",
handle_door_state,
10,
100,
)
self._subscriptions.append(door_states_sub)

Expand Down Expand Up @@ -277,11 +277,11 @@ async def save(building_map: BuildingMap):
)
self._subscriptions.append(map_sub)

def handle_beachandle_state(msg):
async def save(beachandle_state: BeaconState):
await self._rmf_repo.save_beacon_state(beachandle_state)
self._rmf_events.beacons.on_next(beachandle_state)
logging.debug("%s", beachandle_state)
def handle_beacon_state(msg):
async def save(beacon_state: BeaconState):
await self._rmf_repo.save_beacon_state(beacon_state)
self._rmf_events.beacons.on_next(beacon_state)
logging.debug("%s", beacon_state)

msg = cast(RmfBeaconState, msg)
bs = BeaconState(
Expand All @@ -293,13 +293,13 @@ async def save(beachandle_state: BeaconState):
)
self._loop.create_task(save(bs))

beachandle_sub = self._ros_node.create_subscription(
beacon_sub = self._ros_node.create_subscription(
RmfBeaconState,
"beachandle_state",
handle_beachandle_state,
10,
"beacon_state",
handle_beacon_state,
100,
)
self._subscriptions.append(beachandle_sub)
self._subscriptions.append(beacon_sub)

def handle_delivery_alert(msg):
msg = cast(RmfDeliveryAlert, msg)
Expand Down

0 comments on commit eecd101

Please sign in to comment.