Skip to content

Commit

Permalink
Merge pull request #23 from BeanstalkFarms/fix/sk/remove-git
Browse files Browse the repository at this point in the history
Remove git commit from logs + use correct twitter env var names
  • Loading branch information
soilking authored Sep 3, 2024
2 parents ecf201e + 390a029 commit 87f0142
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 37 deletions.
11 changes: 0 additions & 11 deletions src/bots/discord_basin_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,6 @@ async def on_ready(self):
self.current_guilds.append(guild)
logging.info(f"Guild found: {guild.id}")

# Log the commit of this run.
logging.info(
"Git commit is "
+ subprocess.check_output(
["git", "rev-parse", "--short", "HEAD"],
cwd=os.path.dirname(os.path.realpath(__file__)),
)
.decode("ascii")
.strip()
)

@tasks.loop(seconds=0.4, reconnect=True)
async def send_queued_messages(self):
"""Send messages in queue.
Expand Down
11 changes: 0 additions & 11 deletions src/bots/discord_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,17 +208,6 @@ async def on_ready(self):
self.current_guilds.append(guild)
logging.info(f"Guild found: {guild.id}")

# Log the commit of this run.
logging.info(
"Git commit is "
+ subprocess.check_output(
["git", "rev-parse", "--short", "HEAD"],
cwd=os.path.dirname(os.path.realpath(__file__)),
)
.decode("ascii")
.strip()
)

@tasks.loop(seconds=10, reconnect=True)
async def _update_naming(self):
if not self.nickname:
Expand Down
8 changes: 4 additions & 4 deletions src/bots/twitter_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ def send_msg(self, msg):
class BeanstalkTwitterBot(TwitterBot):
def __init__(self, prod=False, dry_run=None):
if prod:
self.api_key = os.environ["TWITTER_BOT_API_KEY"]
self.api_key_secret = os.environ["TWITTER_BOT_API_KEY_SECRET"]
self.access_token = os.environ["TWITTER_BOT_ACCESS_TOKEN"]
self.access_token_secret = os.environ["TWITTER_BOT_ACCESS_TOKEN_SECRET"]
self.api_key = os.environ["TWITTER_BS_BOT_API_KEY"]
self.api_key_secret = os.environ["TWITTER_BS_BOT_API_KEY_SECRET"]
self.access_token = os.environ["TWITTER_BS_BOT_ACCESS_TOKEN"]
self.access_token_secret = os.environ["TWITTER_BS_BOT_ACCESS_TOKEN_SECRET"]
logging.info("BeanstalkTwitterBot configured as a production instance.")
else:
self.set_keys_staging()
Expand Down
11 changes: 0 additions & 11 deletions src/bots/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,6 @@ def set_status(self, text):
self.status_text = text

async def on_ready(self):
# Log the commit of this run.
logging.info(
"Git commit is "
+ subprocess.check_output(
["git", "rev-parse", "--short", "HEAD"],
cwd=os.path.dirname(os.path.realpath(__file__)),
)
.decode("ascii")
.strip()
)

self.user_id = self.user.id
# self.beanstalk_guild = self.get_guild(BEANSTALK_GUILD_ID)
# Guild IDs for all servers this bot is in.
Expand Down

0 comments on commit 87f0142

Please sign in to comment.