Skip to content

Commit

Permalink
Update MasterServer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
BattlefieldDuck committed Mar 12, 2024
1 parent 773bcf8 commit 1c423cc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions MasterServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,13 @@ def find(self, *, host: str, port: int):
def run(self):
# Record the start time
start_time = time.time()
print(f"Running job: {self.key}")

# Run job
self.job()

# Calculate elapsed time
elapsed_time = time.time() - start_time
print(f"Job done: {self.key}. Time elapsed: {elapsed_time:.2f} seconds")
print(f"[{self.key}] Job done. Time elapsed: {elapsed_time:.2f} seconds")

def _fetch_url(self, url: str):
response = requests.get(url, stream=True, timeout=15)
Expand Down

0 comments on commit 1c423cc

Please sign in to comment.