Update
This commit is contained in:
parent
5a46349248
commit
d6fa089f1e
@ -16,7 +16,7 @@ async def send_request(client, server_ip, rangee, sigma):
|
||||
# Główna funkcja do wysyłania zapytań do wszystkich serwerów równocześnie
|
||||
async def main(a_start, b_end, sigma):
|
||||
num_chunks = len(ip_list)
|
||||
chunk_size = (b_end - a_start + 1) // num_chunks
|
||||
chunk_size = (b_end - a_start + num_chunks) // num_chunks
|
||||
ranges = [(a_start + i * chunk_size, min(a_start + (i + 1) * chunk_size - 1, b_end))
|
||||
for i in range(num_chunks)]
|
||||
async with httpx.AsyncClient() as client:
|
||||
@ -32,7 +32,7 @@ async def main(a_start, b_end, sigma):
|
||||
|
||||
# Uruchomienie głównej funkcji
|
||||
if __name__ == "__main__":
|
||||
sigma = 230531719
|
||||
sigma = 1220131495
|
||||
a = 1
|
||||
b = 10000
|
||||
asyncio.run(main(a, b, sigma))
|
||||
|
2
main.py
2
main.py
@ -29,7 +29,7 @@ async def compute(data: ComputeInput):
|
||||
|
||||
num_chunks = 16
|
||||
|
||||
chunk_size = (b_end - a_start + 1) // num_chunks
|
||||
chunk_size = (b_end - a_start + num_chunks) // num_chunks
|
||||
ranges = [(a_start + i * chunk_size, min(a_start + (i + 1) * chunk_size - 1, b_end))
|
||||
for i in range(num_chunks)]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user