mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-16 20:48:37 -04:00
Update the flask-socketio config to play more nicely:
* Reverts run commands to what they previously were * Addresses some outstanding linting/formatting * Accounts for proper config initialization (CORS, Redis) * Updates dependencies and pulls in latest changes from main Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
@@ -32,13 +32,6 @@ from notifications_utils.clients.encryption.encryption_client import Encryption
|
||||
from notifications_utils.clients.redis.redis_client import RedisClient
|
||||
from notifications_utils.clients.zendesk.zendesk_client import ZendeskClient
|
||||
|
||||
socketio = SocketIO(
|
||||
cors_allowed_origins="*",
|
||||
message_queue="redis://localhost:6379",
|
||||
logger=True,
|
||||
engineio_logger=True
|
||||
)
|
||||
|
||||
|
||||
class NotifyCelery(Celery):
|
||||
def init_app(self, app):
|
||||
@@ -102,6 +95,14 @@ zendesk_client = ZendeskClient()
|
||||
redis_store = RedisClient()
|
||||
document_download_client = DocumentDownloadClient()
|
||||
|
||||
socketio = SocketIO(
|
||||
cors_allowed_origins=[
|
||||
config.Config.ADMIN_BASE_URL,
|
||||
],
|
||||
message_queue=config.Config.REDIS_URL,
|
||||
logger=True,
|
||||
engineio_logger=True,
|
||||
)
|
||||
|
||||
notification_provider_clients = NotificationProviderClients()
|
||||
|
||||
@@ -122,6 +123,7 @@ def create_app(application):
|
||||
socketio.init_app(application)
|
||||
|
||||
from app.socket_handlers import register_socket_handlers
|
||||
|
||||
register_socket_handlers(socketio)
|
||||
request_helper.init_app(application)
|
||||
db.init_app(application)
|
||||
|
||||
Reference in New Issue
Block a user