Skip to content

Commit

Permalink
Auto merge of rust-lang#12686 - Turbo87:publish-script, r=epage
Browse files Browse the repository at this point in the history
publish.py: Remove obsolete `sleep()` calls

`cargo` waits for the package to appear in the index by default these days, so these obsolete extra `sleep()` calls are just making the publish process slower now without any advantages.

see https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/publish.2Epy
  • Loading branch information
bors authored and ehuss committed Oct 7, 2023
1 parent 8ef08e8 commit b5bec7e
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import os
import re
import subprocess
import time
import urllib.request
from urllib.error import HTTPError

Expand Down Expand Up @@ -52,13 +51,9 @@ def maybe_publish(path):

def main():
print('Starting publish...')
for i, path in enumerate(TO_PUBLISH):
if maybe_publish(path):
if i < len(TO_PUBLISH)-1:
# Sleep to allow the index to update. This should probably
# check that the index is updated, or use a retry loop
# instead.
time.sleep(5)
for path in TO_PUBLISH:
maybe_publish(path)

print('Publish complete!')


Expand Down

0 comments on commit b5bec7e

Please sign in to comment.