Increase concurrent db connections
Decrease timeout on Scorebug buttons to reduce open connections
This commit is contained in:
parent
579bde6c03
commit
8e35812cd3
@ -175,7 +175,7 @@ class Gameplay(commands.Cog):
|
|||||||
|
|
||||||
if this_play.game.roll_buttons and interaction.user.id in [this_play.game.away_team.gmid, this_play.game.home_team.gmid]:
|
if this_play.game.roll_buttons and interaction.user.id in [this_play.game.away_team.gmid, this_play.game.home_team.gmid]:
|
||||||
logger.info(f'Including scorebug buttons')
|
logger.info(f'Including scorebug buttons')
|
||||||
scorebug_buttons = ScorebugButtons(this_play, scorebug_embed)
|
scorebug_buttons = ScorebugButtons(this_play, scorebug_embed, timeout=5)
|
||||||
|
|
||||||
if this_play.on_base_code == 0 and this_play.game.auto_roll and not this_play.batter.team.is_ai and not this_play.is_new_inning:
|
if this_play.on_base_code == 0 and this_play.game.auto_roll and not this_play.batter.team.is_ai and not this_play.is_new_inning:
|
||||||
logger.info(f'Rolling ab')
|
logger.info(f'Rolling ab')
|
||||||
|
|||||||
@ -20,7 +20,7 @@ logger = logging.getLogger('discord_app')
|
|||||||
# connect_args = {"check_same_thread": False}
|
# connect_args = {"check_same_thread": False}
|
||||||
# engine = create_engine(sqlite_url, echo=False, connect_args=connect_args)
|
# engine = create_engine(sqlite_url, echo=False, connect_args=connect_args)
|
||||||
postgres_url = f'postgresql://{os.getenv('DB_USERNAME')}:{os.getenv('DB_PASSWORD')}@{os.getenv('DB_URL')}/{os.getenv('DB_NAME')}'
|
postgres_url = f'postgresql://{os.getenv('DB_USERNAME')}:{os.getenv('DB_PASSWORD')}@{os.getenv('DB_URL')}/{os.getenv('DB_NAME')}'
|
||||||
engine = create_engine(postgres_url)
|
engine = create_engine(postgres_url, pool_size=10, max_overflow=30)
|
||||||
CACHE_LIMIT = 1209600 # in seconds
|
CACHE_LIMIT = 1209600 # in seconds
|
||||||
SBA_COLOR = 'a6ce39'
|
SBA_COLOR = 'a6ce39'
|
||||||
SBA_LOGO = 'https://sombaseball.ddns.net/static/images/sba-logo.png'
|
SBA_LOGO = 'https://sombaseball.ddns.net/static/images/sba-logo.png'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user