Skip to content

Commit

Permalink
Threads sleep a bit now
Browse files Browse the repository at this point in the history
  • Loading branch information
madprogramer committed Sep 3, 2021
1 parent bd1bbd0 commit b270da5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions subscripts/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ def immunize(self,args,visit_queue, cookie_payload):
except requests.exceptions.ConnectionError:
with self.print_lock: log("\033[91mERROR: No Connection\n\033[94mRequeuing {}\033[0m".format(URL))
self.visit_queue.put(URL)
#TODO: ADD A SLEEP HERE?
#SLEEP
e = threading.Event()
e.wait(timeout=0.5)
#If the URL is not a GD link, Not A Google Drive Error
except NAGDError as e:
with self.print_lock:
Expand All @@ -134,7 +136,9 @@ def immunize(self,args,visit_queue, cookie_payload):
with self.print_lock: log("\033[91mERROR: {}\033[0m".format(e))
#Add back into the queue?
self.visit_queue.put(URL)
#TODO: ADD A SLEEP HERE?
#SLEEP
e = threading.Event()
e.wait(timeout=0.5)

def request(self,args,URLs,cookie_payload):

Expand Down

0 comments on commit b270da5

Please sign in to comment.