Download node_modules/bottleneck/src/redis/queued.lua from mikmc5/aistats: direct link, hf CLI and curl.
- Browser
- Download file 373 Bytes
-
https://huggingface.co/spaces/mikmc5/aistats/resolve/main/node_modules/bottleneck/src/redis/queued.lua
- Command line
-
hf download hf://spaces/mikmc5/aistats/node_modules/bottleneck/src/redis/queued.lua
-
curl -L -o queued.lua https://huggingface.co/spaces/mikmc5/aistats/resolve/main/node_modules/bottleneck/src/redis/queued.lua
373 Bytes
| local clientTimeout = tonumber(redis.call('hget', settings_key, 'clientTimeout')) | |
| local valid_clients = redis.call('zrangebyscore', client_last_seen_key, (now - clientTimeout), 'inf') | |
| local client_queued = redis.call('hmget', client_num_queued_key, unpack(valid_clients)) | |
| local sum = 0 | |
| for i = 1, #client_queued do | |
| sum = sum + tonumber(client_queued[i]) | |
| end | |
| return sum | |