Skip to content

Commit

Permalink
No need to sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-finley committed Apr 28, 2024
1 parent 768758b commit f778def
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
4 changes: 0 additions & 4 deletions queue_files/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import json
import os
from time import sleep

import dropbox
import psycopg
Expand Down Expand Up @@ -51,9 +50,6 @@ def run(event, context):
futures = []
for i, entry in enumerate(dropbox_result.entries):
print(entry)
# Every third item, sleep a bit
if i % 3 == 0 and i != 0:
sleep(1)
clean_name = entry.path_display.removeprefix("/")
if isinstance(entry, dropbox.files.FileMetadata):
print(f"Queueing {clean_name}")
Expand Down
4 changes: 0 additions & 4 deletions requeue_failed_files/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import json
import os
from time import sleep

import dropbox
import psycopg
Expand Down Expand Up @@ -32,9 +31,6 @@ def run(request):
futures = []
for i, path in enumerate(desktop_paths):
print(path)
# Every third item, sleep a bit
if i % 3 == 0 and i != 0:
sleep(1)
future = publisher.publish(TOPIC_NAME, path.encode("utf-8"))
futures.append(future)

Expand Down

0 comments on commit f778def

Please sign in to comment.