aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Mathes <adam@trenchant.org>2017-03-05 09:39:20 -0800
committerAdam Mathes <adam@trenchant.org>2017-03-05 09:39:20 -0800
commit7aeea0357d7664b250288a8fd0834449b9d14e3c (patch)
treeda1a0101e675e89c18a246827f6e44cd6efeac26
parent915ae54e7e5dc639972a40d4a7817d20b54fc1e2 (diff)
add required_engagements setting
-rw-r--r--example_settings.py1
-rw-r--r--unloved_tweets.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/example_settings.py b/example_settings.py
index 5657699..acd88a3 100644
--- a/example_settings.py
+++ b/example_settings.py
@@ -1,5 +1,6 @@
DEBUG = True
MINUTES_TO_LIVE = 5
+REQUIRED_ENGAGEMENTS = 1
DELETED_TWEETS_FILE = '/home/unloved_tweets/dead_tweets.txt'
consumer_key = ''
consumer_secret = ''
diff --git a/unloved_tweets.py b/unloved_tweets.py
index 647bd38..6a19c00 100644
--- a/unloved_tweets.py
+++ b/unloved_tweets.py
@@ -46,7 +46,7 @@ for tweet in public_tweets:
if tweet.id in tweet_ids_with_replies:
print "has one or more replies!"
- if minutes<60 and minutes>=MINUTES_TO_LIVE and engagements==0:
+ if minutes<60 and minutes>=MINUTES_TO_LIVE and engagements<REQUIRED_ENGAGEMENTS:
if DEBUG:
print "DELETING " + str(tweet.id)
print tweet.text