[tor-commits] [gettor/master] Add time wait to send twitter direct message

hiro at torproject.org hiro at torproject.org
Wed Oct 16 10:39:10 UTC 2019


commit 815e4571b3c19597b1ff164fd273c55d9559816d
Author: hiro <hiro at torproject.org>
Date:   Wed Oct 16 12:39:05 2019 +0200

    Add time wait to send twitter direct message
---
 gettor/services/twitter/twitterdm.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gettor/services/twitter/twitterdm.py b/gettor/services/twitter/twitterdm.py
index dcfc290..8965319 100644
--- a/gettor/services/twitter/twitterdm.py
+++ b/gettor/services/twitter/twitterdm.py
@@ -15,6 +15,7 @@ from __future__ import absolute_import
 import gettext
 import hashlib
 import json
+import time
 
 import configparser
 
@@ -87,6 +88,7 @@ class Twitterdm(object):
             twitter_id, message
         )
         if post_data.status_code == 200:
+            time.sleeps(30)
             self.twitter_callback
         else:
             self.twitter_errback



More information about the tor-commits mailing list