Skip to content

Commit f58ba97

Browse files
committed
"/init" endpoint implementation
1 parent c241060 commit f58ba97

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ help:
2424
.PHONY: build-push
2525
build-push:
2626
docker login ghcr.io
27-
docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag ghcr.io/cloud-py-api/upscaler_example:1.0.0 --tag ghcr.io/cloud-py-api/upscaler_example:latest .
27+
docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag ghcr.io/cloud-py-api/upscaler_example:1.1.0 --tag ghcr.io/cloud-py-api/upscaler_example:latest .
2828

2929
.PHONY: deploy28
3030
deploy28:

appinfo/info.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ It shouldn't be difficult to use an even more advanced model based on this examp
1313
1414
Refer to [How to install](https://github.com/cloud-py-api/upscaler_example/blob/main/HOW_TO_INSTALL.md) to try it.
1515
]]></description>
16-
<version>1.0.0</version>
16+
<version>1.1.0</version>
1717
<licence>agpl</licence>
1818
<author mail="[email protected]" homepage="https://github.com/andrey18106">Andrey Borysenko</author>
1919
<author mail="[email protected]" homepage="https://github.com/bigcat88">Alexander Piskun</author>
@@ -30,7 +30,7 @@ Refer to [How to install](https://github.com/cloud-py-api/upscaler_example/blob/
3030
<docker-install>
3131
<registry>ghcr.io</registry>
3232
<image>cloud-py-api/upscaler_example</image>
33-
<image-tag>1.0.0</image-tag>
33+
<image-tag>1.1.0</image-tag>
3434
</docker-install>
3535
<scopes>
3636
<required>

src/main.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,12 @@ def heartbeat_handler():
223223
return responses.JSONResponse(content={"status": "ok"}, status_code=200)
224224

225225

226+
@APP.post("/init")
227+
def init_callback():
228+
ocs_call(method="PUT", path=f"/index.php/apps/app_api/apps/status/{os.environ['APP_ID']}", json={"progress": 100})
229+
return responses.JSONResponse(content={}, status_code=200)
230+
231+
226232
if __name__ == "__main__":
227233
uvicorn.run(
228234
"main:APP", host=os.environ.get("APP_HOST", "127.0.0.1"), port=int(os.environ["APP_PORT"]), log_level="trace"

0 commit comments

Comments
 (0)