usgs / earthquake-ted

Tweet Earthquake Dispatch
Other
1 stars 3 forks source link

Add multiple account types to tweet_trigger #11

Open mguy-usgs opened 6 years ago

mguy-usgs commented 6 years ago

1) test 2) general 3) significant

currently sends tweets to only one account

mguy-usgs commented 6 years ago

in tweet-trigger check_event function there are multiple checks to confirm is this event should be tweeted or not. In check number 4 about close in space and time, there is no consideration of which account(s) sent a tweet before. So for example: 1) at 10am a M3.1 event occurs and so the test twitter account tweets this event 2) at 10:05am a M5.5 event occurs in the same place, the current code would NOT send any tweets under any account for this event if the close in time configuration was greater than 5 minutes, because the M5.5 was too close in space and time. HOWEVER, now with multiple accounts the check should actually be did the SignificantTwitterAccount send a tweet close in space and time? And in this case the answer would be no it did not, so go ahead and have the SignificantTwitterAccount send a tweet for the M5.5 event.

jtmayer-usgs commented 6 years ago

Authorization information for the four twitter accounts will be placed in the [TWITTER] section of the tweet_trigger.ini file. The naming convention for the keys uses a prefix and suffix, separated by an underscore. The following prefixes are used for the twitter accounts:

For each account, the following suffixes will be used: