From 84aa2a0637ce51eeff117dd4da964f70efda0627 Mon Sep 17 00:00:00 2001 From: PawelDopierala Date: Tue, 26 Nov 2024 22:08:16 +0100 Subject: [PATCH] test --- main.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index 6ede326..e19608a 100644 --- a/main.py +++ b/main.py @@ -33,11 +33,13 @@ async def compute(data: ComputeInput): ranges = [(a_start + i * chunk_size, min(a_start + (i + 1) * chunk_size - 1, b_end)) for i in range(num_chunks)] - with ThreadPoolExecutor() as executor: - futures = [executor.submit(run_compute, a, b, sigma) for a, b in ranges] - results = [f.result() for f in futures] - - return sum(results) % 999999937 + return ranges + # + # with ThreadPoolExecutor() as executor: + # futures = [executor.submit(run_compute, a, b, sigma) for a, b in ranges] + # results = [f.result() for f in futures] + # + # return sum(results) % 999999937 if __name__ == "__main__": uvicorn.run(app, host="0.0.0.0", port=8000)