Kryst4lDem0ni4s commented on code in PR #188:
URL:
https://github.com/apache/incubator-hugegraph-ai/pull/188#discussion_r2021538714
##########
hugegraph-llm/src/hugegraph_llm/utils/decorators.py:
##########
@@ -90,3 +90,13 @@ def wrapper(*args: Any, **kwargs: Any) -> Any:
log.debug("%s QPS: %f/s", args[0].__class__.__name__, qps)
return result
return wrapper
+
+def with_task_id(func: Callable) -> Callable:
+ def wrapper(*args: Any, **kwargs: Any) -> Any:
+ import uuid
+ task_id = str(uuid.uuid4())
+ log.info("New task created with id: %s", task_id)
Review Comment:
Hi, yes, I got back to this issue recently after taking a break for my exams
and academics, after testing the implementation with the changes here is what
I'd like to share.
This current implementation's decorator was made to function with Gradio
Blocks instead of inside the gradio button.
This current implementation worked by generating a uuid for the ongoing task.
This implementation has now been modified to handle in-button task_ids for
concurrency instead of at the gradio-blocks level.
It now successfully works.

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]