Commit e526a3c2 authored by Vitaly Lipatov's avatar Vitaly Lipatov

web-api: remove check lock, allow unlimited concurrent checks

All check operations use curl to /dev/null with -w for results, no temp files or shared state between requests. Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent c7c5569d
......@@ -58,7 +58,6 @@ CHECK_GATEWAYS = [
]
CHECK_TIMEOUT = 10
_check_lock = threading.Lock()
_list_lock = threading.Lock()
......@@ -1739,10 +1738,6 @@ class RouteHandler(http.server.BaseHTTPRequestHandler):
self.send_error_json(400, "Invalid domain or IP")
return
if not _check_lock.acquire(blocking=False):
self.send_error_json(429, "Check already in progress")
return
try:
self.log_message("CHECK %s%s", domain,
" file=%s" % file_url if file_url else "")
......@@ -1820,8 +1815,6 @@ class RouteHandler(http.server.BaseHTTPRequestHandler):
run_speed_test(file_url, on_speed)
result["speed"] = speed
self.send_json(result)
finally:
_check_lock.release()
def main():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment