Skip to content

Commit

Permalink
Added project logo, fixed a spelling error.
Browse files Browse the repository at this point in the history
  • Loading branch information
aschuma committed Jan 27, 2018
1 parent 80b7a69 commit e6caa30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config.py-template
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ conf_twitter_msg_preamble = "#feinstaub"
conf_twitter_tag_bot = "bot"
conf_twitter_user_id = 'my-account'
conf_limit_pm_10_0 = 40
conf_quit_period_in_hours = 6
conf_quiet_period_in_hours = 6


# tweeter
Expand Down
4 changes: 2 additions & 2 deletions tweet.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ def has_bot_marker(timeline_item):


def may_tweet_again():
reference_timestamp = datetime.datetime.now() - datetime.timedelta(hours=conf_quit_period_in_hours)
reference_timestamp = datetime.datetime.now() - datetime.timedelta(hours=conf_quiet_period_in_hours)
tweet_ts = [item.created_at for item in last_bot_tweets()]
allowed = len(tweet_ts) == 0 or max(tweet_ts) < reference_timestamp

print("Quit period NOT exceeded", allowed)
print("may_tweet_again reference={}, tweets_ts{} -> {}".format( reference_timestamp, [str(item) for item in tweet_ts], allowed))

return allowed

Expand Down

0 comments on commit e6caa30

Please sign in to comment.