No random sleep

This commit is contained in:
Felix Ableitner 2018-10-01 14:09:25 -05:00
parent d318978535
commit ac1e01fda1

View file

@ -9,17 +9,11 @@ import requests
import re import re
import sqlite3 import sqlite3
from datetime import datetime, date, time, timedelta from datetime import datetime, date, time, timedelta
import time
import random
if len(sys.argv) < 4: if len(sys.argv) < 4:
print("Usage: python3 tootbot.py twitter_account mastodon_login mastodon_passwd mastodon_instance") print("Usage: python3 tootbot.py twitter_account mastodon_login mastodon_passwd mastodon_instance")
sys.exit(1) sys.exit(1)
random.seed()
sleep_time = random.randint(0, 10 * 60)
time.sleep(sleep_time)
# sqlite db to store processed tweets (and corresponding toots ids) # sqlite db to store processed tweets (and corresponding toots ids)
sql = sqlite3.connect('tootbot.db') sql = sqlite3.connect('tootbot.db')
db = sql.cursor() db = sql.cursor()