Reduce sleep duration and optimize share emission and purchase logic; add .gitignore for virtual environment

This commit is contained in:
Lukian 2025-01-18 21:36:48 +01:00
parent 05c9f5226e
commit df6417e3ea
3 changed files with 8 additions and 9 deletions

View file

@ -43,10 +43,9 @@ if __name__ == "__main__":
while True:
companies = getCompanies()
for company in companies:
price = randint(20, 2000)
for i in range(randint(0, 10)):
emitShare(company["id"], price)
price = randint(20, 2000)
for i in range(randint(0, 4)):
emitShare(randint(0, len(companies) - 1), price)
sleep(30)
sleep(4)