-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat/init route #5
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is the call to "path=f'/index.php/apps/app_api/apps/status/{getenv("APP_ID")}'" after each model download?
04ce630
to
407ebf0
Compare
407ebf0
to
0993380
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not tested this, but looks fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't succeed with local manual install test - looks like the ExApp webserver is hanged after it and /init
doesn't happen to report to Nextcloud progress=100
.
UPD: Maybe I missed something, let me retry to verify
UPD2: No, unfortunately not working, ocs init dispatch call should be async and not block the python process
yeah noticed that the ocs call wasn't going through. I was looking through the nc_py_api to see how it handled this and seems like the issue is related to ocs call not being async here. |
0993380
to
6ef5745
Compare
made the call async and the url was wrong (maybe old path) :p |
while we are here, would you mind also testing the persistent storage @andrey18106 ? Thank you! |
context_chat_backend/controller.py
Outdated
) | ||
|
||
if not app.extra.get('ENABLED', False): | ||
await download_all_models(app, update_progress) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use FastAPI BackgroundTasks in which you will download models in the background
Python's async
is a blocking call in this context, reply for "/init" will not be received on NC side..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, can confirm this issue, finally received time-out error on /init
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that did the trick! How to know if async is blocking in a certain context though?
215e792
to
de2819f
Compare
df7d7bc
to
4ea9789
Compare
Signed-off-by: Anupam Kumar <[email protected]>
- use AppAPI's persistent volume - add /init route and enabled guard - hash check downloaded model files Signed-off-by: Anupam Kumar <[email protected]>
de2819f
to
0b888d5
Compare
Signed-off-by: Anupam Kumar <[email protected]>
1d3bf06
to
61e12fc
Compare
Signed-off-by: Anupam Kumar <[email protected]>
USE_COLORS can be used to turn off colors in non-CI envs Signed-off-by: Anupam Kumar <[email protected]>
61e12fc
to
51cd7da
Compare
No description provided.