Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
onuratakan committed Jul 26, 2023
1 parent 73e1983 commit 7bd549e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/scan/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,26 @@ def web(host=None, port=0):

@staticmethod
def bacground_proccess_1(network, port, ):

try:
response = requests.get(f"http://{network}:{port}/export/block/json")
response = requests.get(f"http://{network}:{port}/export/block/json", timeout=5)
if response.status_code == 200:
for old_key in the_block_db.get_all():
the_block_db.delete(old_key)
the_block_db.set(str(int(time.time())), response.json())

except:

traceback.print_exc()
pass

@staticmethod
def bacground_proccess_2(network, port, ):

try:
response = requests.get(f"http://{network}:{port}/status")
response = requests.get(f"http://{network}:{port}/status", timeout=130)
if response.status_code == 200:

the_statatus_db.set("status", response.json())
except:
traceback.print_exc()
pass

@staticmethod
def background(network_1, port_1, network_2=None, port_2=None,interval_1=1,interval_2=100):
Expand Down

0 comments on commit 7bd549e

Please sign in to comment.