Skip to content

Commit 08899e2

Browse files
manual task call
1 parent 1dd24f2 commit 08899e2

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

doggo.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,13 @@ async def call_robot(self, api_id, params=None):
6262
if params:
6363
args["parameter"] = params
6464

65-
await self.dog.maybe_reconnect()
66-
await self.dog.robot.datachannel.pub_sub.publish_request_new(
67-
RTC_TOPIC["SPORT_MOD"], args
68-
)
65+
def _call():
66+
await self.dog.maybe_reconnect()
67+
await self.dog.robot.datachannel.pub_sub.publish_request_new(
68+
RTC_TOPIC["SPORT_MOD"], args
69+
)
70+
71+
asyncio.create_task(_call())
6972

7073
def tool(self):
7174
return Tool(

0 commit comments

Comments
 (0)