Skip to content

Commit e045831

Browse files
authored
Fix time_delta calculation (#96)
1 parent 96c4565 commit e045831

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tailor_image/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ def tag_file(client, bucket, key, tag_key, tag_value):
4343
def wait_for_index(client, bucket, key):
4444
# Wait until file is not locked to avoid race condition
4545
now = datetime.now()
46-
start_time = int(now.strftime('%Y%m%d%H%M%S'))
47-
random.seed(start_time)
46+
start_time = now
47+
random.seed(int(now.strftime('%Y%m%d%H%M%S')))
4848
timeout = 300 + random.random() * 300 # random timeout from 5 to 10 minutes
4949
while True:
5050
try:

0 commit comments

Comments
 (0)