Skip to content

Commit

Permalink
Allow easy disabling of twitter processing
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbASF committed Jul 30, 2023
1 parent 588e3a9 commit 6048841
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/asfdata.py
Expand Up @@ -584,6 +584,12 @@ def connect_to_endpoint(url, headers):
def process_twitter(handle, count, debug):
if debug:
print(f'-----\ntwitter feed: {handle}')
# Disable processing if count <= 0
if count <= 0:
print('WARN: Twitter disabled; count <= 0')
return sequence_list('twitter',[{
'text': 'Twitter processing is disabled (count <= 0)'
}])
bearer_token = twitter_auth()
if not bearer_token:
print('WARN: no bearer token for Twitter')
Expand Down

0 comments on commit 6048841

Please sign in to comment.