rpa
This commit is contained in:
parent
24cd449827
commit
63d3bfb669
|
|
@ -16,9 +16,11 @@ from .rpa_comm import LiveStreamProductWatchRequest, LiveStreamResult, ProductSe
|
|||
rpa_image = (modal.Image.debian_slim(python_version="3.11")
|
||||
.pip_install_from_pyproject("../pyproject_rpa.toml")
|
||||
.env({"PLAYWRIGHT_BROWSERS_PATH": "/root/browsers"})
|
||||
.run_commands("mkdir /root/browsers")
|
||||
.run_commands("playwright install-deps")
|
||||
.run_commands("playwright install chromium")
|
||||
.run_commands([
|
||||
"mkdir /root/browsers",
|
||||
"playwright install-deps",
|
||||
"playwright install chromium",
|
||||
])
|
||||
.add_local_python_source('cluster')
|
||||
)
|
||||
app = modal.App(name='rpa', image=rpa_image, include_source=False)
|
||||
|
|
@ -341,7 +343,7 @@ with rpa_image.imports():
|
|||
return live_status
|
||||
|
||||
|
||||
def submit_job(data:LiveStreamProductWatchRequest):
|
||||
def submit_job(data: LiveStreamProductWatchRequest):
|
||||
call = rpa_run.spawn(data)
|
||||
return call.object_id
|
||||
|
||||
|
|
@ -354,7 +356,7 @@ with rpa_image.imports():
|
|||
# webcast_ids = ["36861064178"]
|
||||
webcast_id = "36861064178"
|
||||
|
||||
data:LiveStreamProductWatchRequest = LiveStreamProductWatchRequest(live_id=webcast_id)
|
||||
data: LiveStreamProductWatchRequest = LiveStreamProductWatchRequest(live_id=webcast_id)
|
||||
# TODO other info
|
||||
call_id = submit_job(data)
|
||||
print("------call_id:", call_id)
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ from scalar_fastapi import get_scalar_api_reference
|
|||
|
||||
image = (modal.Image.debian_slim()
|
||||
.pip_install([
|
||||
"fastapi[standard]",
|
||||
"pydantic",
|
||||
"scalar-fastapi>=1.0.3",
|
||||
])
|
||||
"fastapi[standard]",
|
||||
"pydantic",
|
||||
"scalar-fastapi>=1.0.3",
|
||||
])
|
||||
.pip_install())
|
||||
app = modal.App("fastapi_rpa", image=image)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue