Merge pull request #61 from ComputerScienceHouse/rq-cleanup

Adding redis host config value and adding redis
This commit is contained in:
Devin Matte 2020-12-21 15:19:31 -05:00 committed by GitHub
commit 8b9567d21a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View file

@ -53,6 +53,7 @@ SQLALCHEMY_DATABASE_URI = environ.get('PROXSTAR_SQLALCHEMY_DATABASE_URI', '')
# REDIS # REDIS
REDIS_HOST = environ.get('PROXSTAR_REDIS_HOST', 'localhost') REDIS_HOST = environ.get('PROXSTAR_REDIS_HOST', 'localhost')
RQ_DASHBOARD_REDIS_HOST = environ.get('PROXSTAR_REDIS_HOST', 'localhost')
REDIS_PORT = int(environ.get('PROXSTAR_REDIS_PORT', '6379')) REDIS_PORT = int(environ.get('PROXSTAR_REDIS_PORT', '6379'))
# VNC # VNC

View file

@ -59,7 +59,7 @@ ssh_tunnels = []
auth = get_auth(app) auth = get_auth(app)
redis_conn = Redis(app.config['REDIS_HOST'], app.config['REDIS_PORT']) redis_conn = Redis(app.config['REDIS_HOST'], app.config['REDIS_PORT'])
q = Queue(connection=redis_conn) q = Queue(connection=redis_conn, default_timeout=360)
scheduler = Scheduler(connection=redis_conn) scheduler = Scheduler(connection=redis_conn)
engine = create_engine(app.config['SQLALCHEMY_DATABASE_URI']) engine = create_engine(app.config['SQLALCHEMY_DATABASE_URI'])

View file

@ -2,6 +2,7 @@ import os
import sentry_sdk import sentry_sdk
from sentry_sdk.integrations.rq import RqIntegration from sentry_sdk.integrations.rq import RqIntegration
from sentry_sdk.integrations.redis import RedisIntegration
if os.path.exists('config_local.py'): if os.path.exists('config_local.py'):
import config_local as config import config_local as config
@ -10,6 +11,6 @@ else:
sentry_sdk.init( sentry_sdk.init(
config.SENTRY_DSN, config.SENTRY_DSN,
integrations=[RqIntegration()], integrations=[RqIntegration(), RedisIntegration()],
environment=config.SENTRY_ENV environment=config.SENTRY_ENV,
) )