File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
packages/service-library/src/servicelib/redis Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -26,10 +26,19 @@ def _load_script(script_name: str) -> str:
2626 return script_file .read_text (encoding = "utf-8" ).strip ()
2727
2828
29+ # TODO: old
2930ACQUIRE_SEMAPHORE_SCRIPT : Final [str ] = _load_script ("acquire_semaphore" )
3031RELEASE_SEMAPHORE_SCRIPT : Final [str ] = _load_script ("release_semaphore" )
3132RENEW_SEMAPHORE_SCRIPT : Final [str ] = _load_script ("renew_semaphore" )
3233COUNT_SEMAPHORE_SCRIPT : Final [str ] = _load_script ("count_semaphore" )
3334
34- SCRIPT_BAD_EXIT_CODE : Final [int ] = 255
35+ # fair semaphore scripts (token pool based)
36+ ACQUIRE_FAIR_SEMAPHORE_V2_SCRIPT : Final [str ] = _load_script ("acquire_fair_semaphore_v2" )
37+ RELEASE_FAIR_SEMAPHORE_V2_SCRIPT : Final [str ] = _load_script ("release_fair_semaphore_v2" )
38+ CLEANUP_FAIR_SEMAPHORE_V2_SCRIPT : Final [str ] = _load_script ("cleanup_fair_semaphore_v2" )
39+ RENEW_FAIR_SEMAPHORE_V2_SCRIPT : Final [str ] = _load_script ("renew_fair_semaphore_v2" )
40+ COUNT_FAIR_SEMAPHORE_V2_SCRIPT : Final [str ] = _load_script ("count_fair_semaphore_v2" )
41+
42+
3543SCRIPT_OK_EXIT_CODE : Final [int ] = 0
44+ SCRIPT_BAD_EXIT_CODE : Final [int ] = 255
You can’t perform that action at this time.
0 commit comments