Jeremy White : Add a 100ms delay when sending patches.

Alexandre Julliard julliard at winehq.org
Thu May 5 01:07:53 CDT 2022


Module: tools
Branch: master
Commit: 80005171b3d0b727d8dc2a394b3ab41d8152b29c
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=80005171b3d0b727d8dc2a394b3ab41d8152b29c

Author: Jeremy White <jwhite at codeweavers.com>
Date:   Tue May  3 15:21:36 2022 -0500

Add a 100ms delay when sending patches.

The hope is that this will cause the timing of message
arrival to work out well for naive mail display programs,
such as the winehq patch tracker.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 gitlab/gitlab-to-mail/gitlabtomail.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gitlab/gitlab-to-mail/gitlabtomail.py b/gitlab/gitlab-to-mail/gitlabtomail.py
index 15fa5dd..db74b5b 100755
--- a/gitlab/gitlab-to-mail/gitlabtomail.py
+++ b/gitlab/gitlab-to-mail/gitlabtomail.py
@@ -7,6 +7,7 @@ import re
 import sys
 import datetime
 import dateutil.parser
+import time
 import requests
 import mailbox
 import smtplib
@@ -615,6 +616,8 @@ def process_mr(mr, update_db):
     send_email(cover)
     if nr_patches <= settings.MAXIMUM_PATCHES:
         for nr, mail in enumerate(patches):
+            # The hope is that a slight delay will allow receivers to order the patches correctly.
+            time.sleep(0.1)
             fixup_patch(mail, iid, version, nr+1)
             date = date + datetime.timedelta(seconds=1)
             fixup_date(mail, date)




More information about the wine-cvs mailing list