File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,14 @@ class InProgress:
2424class ResultCache :
2525 """
2626 Note this class is a work in progress
27+ Its purpose is to act as a central point for managing in progress
28+ async calls, allowing multiple clients to join and receive progress
29+ updates, get results and/or cancel in progress calls
30+ TODO CRITICAL!! Decide how to limit Async tokens for security purposes
31+ suggest use authentication protocol for identity - may need to add an
32+ authorisation layer to decide if a user is allowed to join an existing
33+ async call
34+ TODO name is probably not quite right, more of a result broker?
2735 TODO externalise cachetools to allow for other implementations
2836 e.g. redis etal for production scenarios
2937 TODO properly support join nothing actually happens at the moment
@@ -34,6 +42,8 @@ class ResultCache:
3442 TODO keep_alive logic is not correct as per spec - results are cached for too long,
3543 probably better than too short
3644 TODO needs a lot more testing around edge cases/failure scenarios
45+ TODO might look into more fine grained locks, one global lock is a bottleneck
46+ though this could be delegated to other cache impls if external
3747 """
3848
3949 _in_progress : dict [types .AsyncToken , InProgress ]
You can’t perform that action at this time.
0 commit comments