Skip to content

Commit

Permalink
feat : port 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
seokho-1116 committed Jul 28, 2024
1 parent 80fcb2a commit 47cbd61
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions backend/AnimatedDrawings/application/config/queue_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class QueueConfig:
USERNAME = RootConfig.CONFIG_FILE['rabbitmq']['username']
BROKER_HOST = RootConfig.CONFIG_FILE['rabbitmq']['host']
PASSWORD = RootConfig.CONFIG_FILE['rabbitmq']['password']
PORT = RootConfig.CONFIG_FILE['rabbitmq']['port']
VIRTUAL_HOST = RootConfig.CONFIG_FILE['rabbitmq']['virtual-host']
CAPSULE_SKIN_REQUEST_QUEUE_NAME = RootConfig.CONFIG_FILE['rabbitmq'][
'queue_name']
Expand All @@ -17,11 +18,16 @@ class QueueConfig:

@staticmethod
def get_celery_broker_url() -> str:
return 'pyamqp://%s:%s@%s:5672%s' % (QueueConfig.USERNAME,
QueueConfig.PASSWORD,
QueueConfig.BROKER_HOST,
QueueConfig.VIRTUAL_HOST)
return 'pyamqp://%s:%s@%s:%s%s' % (QueueConfig.USERNAME,
QueueConfig.PASSWORD,
QueueConfig.BROKER_HOST,
QueueConfig.VIRTUAL_HOST,
QueueConfig.PORT)

@staticmethod
def get_kombu_broker_url() -> str:
return f'amqp://{QueueConfig.USERNAME}:{QueueConfig.PASSWORD}@{QueueConfig.BROKER_HOST}/{QueueConfig.VIRTUAL_HOST}'
return 'amqp://%s:%s@%s:%s%s' % (QueueConfig.USERNAME,
QueueConfig.PASSWORD,
QueueConfig.BROKER_HOST,
QueueConfig.VIRTUAL_HOST,
QueueConfig.PORT)
2 changes: 1 addition & 1 deletion backend/AnimatedDrawings/application/config/yml
Submodule yml updated from 443596 to ec74aa

0 comments on commit 47cbd61

Please sign in to comment.