fastapi 封装
This commit is contained in:
parent
546b6caa90
commit
d2debb56d3
4
main.py
4
main.py
@ -60,9 +60,9 @@ def get_device_size(item: Device):
|
|||||||
#
|
#
|
||||||
|
|
||||||
@app.post("/task/app/douyin")
|
@app.post("/task/app/douyin")
|
||||||
def douyin_task(item: Device):
|
async def douyin_task(item: Device):
|
||||||
if item.serial not in devices:
|
if item.serial not in devices:
|
||||||
return {"error": "设备 {} 不存在".format(item.serial)}
|
return Response(code=500, msg="设备 {} 不存在".format(item.serial))
|
||||||
|
|
||||||
d = devices[item.serial]
|
d = devices[item.serial]
|
||||||
d.app_start("com.ss.android.ugc.aweme", stop=False)
|
d.app_start("com.ss.android.ugc.aweme", stop=False)
|
||||||
|
Loading…
Reference in New Issue
Block a user