generated from lucien/api-template
Added companies and shareholders main loop
This commit is contained in:
parent
8f11c56d1a
commit
b002d0d730
4 changed files with 32 additions and 22 deletions
|
@ -1,6 +1,8 @@
|
|||
import requests
|
||||
from time import sleep
|
||||
from random import randint
|
||||
|
||||
HOST = "http://localhost:3000/"
|
||||
HOST = "http://192.168.200.15/"
|
||||
|
||||
"""Affichage des actions mises en vente par une entreprise
|
||||
input :
|
||||
|
@ -38,5 +40,13 @@ def getCompanies():
|
|||
return r.json()
|
||||
|
||||
if __name__ == "__main__":
|
||||
pass
|
||||
while True:
|
||||
companies = getCompanies()
|
||||
|
||||
for company in companies:
|
||||
price = randint(20, 2000)
|
||||
for i in range(randint(0, 10)):
|
||||
emmitShare(company["id"], price)
|
||||
|
||||
sleep(30)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue