File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,20 @@ class InProgress:
2222
2323
2424class ResultCache :
25+ """
26+ Note this class is a work in progress
27+ TODO externalise cachetools to allow for other implementations
28+ e.g. redis etal for production scenarios
29+ TODO properly support join nothing actually happens at the moment
30+ TODO intercept progress notifications from original session and pass to joined
31+ sessions
32+ TODO handle session closure gracefully -
33+ at the moment old connections will hang around and cause problems later
34+ TODO keep_alive logic is not correct as per spec - results are cached for too long,
35+ probably better than too short
36+ TODO needs a lot more testing around edge cases/failure scenarios
37+ """
38+
2539 _in_progress : dict [types .AsyncToken , InProgress ]
2640
2741 def __init__ (self , max_size : int , max_keep_alive : int ):
@@ -79,7 +93,7 @@ async def join_call(
7993 async with self ._lock :
8094 in_progress = self ._in_progress .get (req .params .token )
8195 if in_progress is None :
82- # TODO consider creating new token to allow client
96+ # TODO consider creating new token to allow client
8397 # to get message describing why it wasn't accepted
8498 return types .CallToolAsyncResult (accepted = False )
8599 else :
You can’t perform that action at this time.
0 commit comments