mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-02-12 13:01:51 +00:00
Merge pull request #61 from ComputerScienceHouse/rq-cleanup
Adding redis host config value and adding redis
This commit is contained in:
commit
8b9567d21a
3 changed files with 5 additions and 3 deletions
|
@ -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
|
||||||
|
|
|
@ -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'])
|
||||||
|
|
|
@ -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,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue