Skip to content

Commit

Permalink
Disable 5-second delay between comment postings when --dry-run is spe…
Browse files Browse the repository at this point in the history
…cified.
  • Loading branch information
joelpt committed Dec 10, 2014
1 parent 1be33da commit 5dd1977
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions migrateissues.py
Expand Up @@ -147,14 +147,15 @@ def add_comments_to_issue(github_issue, gcode_issue):
if not options.dry_run:
topost = topost.encode('utf-8')
github_issue.create_comment(topost)

# We use a delay to avoid comments being created on GitHub
# in the wrong order, due to network non-determinism.
# Without this delay, I consistently observed a full 1 in 3
# GoogleCode issue comments being reordered.
# XXX: querying GitHub in a loop to see when the comment has
# been posted may be faster, but will cut into the rate limit.
time.sleep(5)
output('.')
# We use a delay to avoid comments being created on GitHub
# in the wrong order, due to network non-determinism.
# Without this delay, I consistently observed a full 1 in 3
# GoogleCode issue comments being reordered.
# XXX: querying GitHub in a loop to see when the comment has
# been posted may be faster, but will cut into the rate limit.
time.sleep(5)

def get_attachments(link, attachments):
if not attachments:
Expand Down

0 comments on commit 5dd1977

Please sign in to comment.