Bots/Instrumentation: Difference between revisions
From charlesreid1
No edit summary |
No edit summary |
||
| Line 8: | Line 8: | ||
https://charlesreid1.com:3000/charlesreid1/rainbow-mind-machine | https://charlesreid1.com:3000/charlesreid1/rainbow-mind-machine | ||
https://charlesreid1.com:3000/charlesreid1/rainbow-mind-machine/src/master/rainbowmindmachine/Sheep.py#L348 | |||
<pre> | |||
def _tweet(self,twit): | |||
""" | |||
Private method. | |||
Publish a twit. | |||
""" | |||
# call twitter api to tweet the twit | |||
try: | |||
# tweet: | |||
self.t.statuses.update(status=twit) | |||
### # everything else: | |||
### for stat in stats: | |||
### msg = self.timestamp_message(">>> "+twit) | |||
### logging.info(msg) | |||
msg = self.timestamp_message(">>> Tweet was successful: %s"%(twit)) | |||
logging.info(msg) | |||
</pre> | |||
[[Category:Bots]] | [[Category:Bots]] | ||
Revision as of 04:25, 3 February 2018
Categorizing bots:
- currently, we have logging capacity
- what we need is a database module for logging
- logging functionality may need fixing...
https://charlesreid1.com:3000/charlesreid1/apollospacejunk
https://charlesreid1.com:3000/charlesreid1/rainbow-mind-machine
def _tweet(self,twit):
"""
Private method.
Publish a twit.
"""
# call twitter api to tweet the twit
try:
# tweet:
self.t.statuses.update(status=twit)
### # everything else:
### for stat in stats:
### msg = self.timestamp_message(">>> "+twit)
### logging.info(msg)
msg = self.timestamp_message(">>> Tweet was successful: %s"%(twit))
logging.info(msg)