Skip to content

Commit

Permalink
Merge pull request #1965 from avrae/nightly
Browse files Browse the repository at this point in the history
Nightly Merge
  • Loading branch information
SeanStoves committed Jan 10, 2024
2 parents caf3973 + 80cd2d6 commit adffbf4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
15 changes: 7 additions & 8 deletions dbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import sys
import time
import traceback
import certifi


from redis import asyncio as redis
import d20
Expand All @@ -32,9 +32,10 @@
from utils.help import help_command
from utils.redisIO import RedisIO

# Adding dotenv to test in local
# from dotenv import load_dotenv
# load_dotenv()
#This method will load the variables from .env into the environment for running in local
#from dotenv import load_dotenv
#load_dotenv()


# -----COGS-----
COGS = (
Expand Down Expand Up @@ -84,10 +85,8 @@ def __init__(self, prefix, description=None, **options):
self.state = "init"

# dbs
if config.ENVIRONMENT == "nightly":
self.mclient = motor.motor_asyncio.AsyncIOMotorClient(config.MONGO_URL, tlsCAFile=certifi.where())
else:
self.mclient = motor.motor_asyncio.AsyncIOMotorClient(config.MONGO_URL)
self.mclient = motor.motor_asyncio.AsyncIOMotorClient(config.MONGO_URL)

self.mdb = self.mclient[config.MONGODB_DB_NAME]
self.rdb = self.loop.run_until_complete(self.setup_rdb())

Expand Down
5 changes: 2 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ gspread==5.12.4
httplib2==0.22.0
launchdarkly-server-sdk==7.2.0
markdownify==0.11.6
motor==3.3.2
motor==2.3.1
Pillow==10.1.0
psutil==5.9.7
pydantic~=1.10.13
Expand All @@ -29,9 +29,8 @@ boto3==1.33.0 # used by clustering in certain scenarios
botocore==1.33.12
dnspython==2.1.0 # used by mongodb
google-auth==2.13.0
pymongo==4.6.1
pymongo==3.11.3 # pin this below 4.0 - TLS config changes in 4.0 are breaking

# Handling for Datadog
ddtrace>=0.59.1
certifi~=2023.11.17

7 changes: 2 additions & 5 deletions scripts/ensure_indices.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import certifi

from pymongo import ASCENDING, DESCENDING, IndexModel, MongoClient

Expand Down Expand Up @@ -97,10 +96,8 @@ def run(mdb):


if __name__ == "__main__":
if os.getenv("ENVIRONMENT", "development") == "development":
mclient = MongoClient(os.getenv("MONGO_URL", "mongodb://localhost:27017"))
else:
mclient = MongoClient(os.getenv("MONGO_URL", "mongodb://localhost:27017"), tlsCAFile=certifi.where())
mclient = MongoClient(os.getenv("MONGO_URL", "mongodb://localhost:27017"))


mdb = mclient[os.getenv("MONGO_DB", "avrae")]

Expand Down

0 comments on commit adffbf4

Please sign in to comment.