From 9acd7118fa04ff246b85272eb045a78c5936d2c4 Mon Sep 17 00:00:00 2001 From: zchen Date: Tue, 26 Mar 2024 11:44:43 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=B5=8B=E8=AF=95RABBITMQ=20=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e2493c6..4d34b05 100644 --- a/.gitignore +++ b/.gitignore @@ -131,4 +131,5 @@ uwsgi app/logs app/logs/* *.log -*.jpg \ No newline at end of file +*.jpg +Dockerfile \ No newline at end of file From 828caaecb2f0689387d29c3cd36e25565b41ed5f Mon Sep 17 00:00:00 2001 From: zchen Date: Tue, 26 Mar 2024 11:46:58 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=B5=8B=E8=AF=95RABBITMQ=20=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fa30e10..16dc03d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,4 +19,4 @@ LABEL maintainer="zchengrong@yeah.net" \ name="trinity_aida" -CMD ["gunicorn", "-c", "gunicorn_config.py", "app.main:app" , "-e", "RABBITMQ_QUEUES=SuperResolution-dev"] \ No newline at end of file +CMD ["gunicorn", "-c", "gunicorn_config.py", "app.main:app" , "-e", "RABBITMQ_QUEUES=SuperResolution-prod"] \ No newline at end of file From 6739b46d40bd8c297fd8dba04bd7d0901ed31923 Mon Sep 17 00:00:00 2001 From: zhouchengrong Date: Mon, 15 Apr 2024 18:35:44 +0800 Subject: [PATCH 3/4] =?UTF-8?q?feat=20generate=20=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- app/core/config.py | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2859915..fa30e10 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,4 +19,4 @@ LABEL maintainer="zchengrong@yeah.net" \ name="trinity_aida" -CMD ["gunicorn", "-c", "gunicorn_config.py", "app.main:app" , "-e", "RABBITMQ_QUEUES=SuperResolution-local"] \ No newline at end of file +CMD ["gunicorn", "-c", "gunicorn_config.py", "app.main:app" , "-e", "RABBITMQ_QUEUES=SuperResolution-dev"] \ No newline at end of file diff --git a/app/core/config.py b/app/core/config.py index 0444760..e286b5d 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -19,19 +19,15 @@ class Settings(BaseSettings): LOGGING_CONFIG_FILE = os.path.join(BASE_DIR, 'logging_env.py') -DEBUG = True -ENV = 0 +DEBUG = False if DEBUG: LOGS_PATH = "logs/errors.log" else: LOGS_PATH = "app/logs/errors.log" -RABBITMQ_ENV = "" - -if ENV == 1: - RABBITMQ_ENV = "dev" -elif ENV == 2: - RABBITMQ_ENV = "local" +# RABBITMQ_ENV = "" +RABBITMQ_ENV = "dev" +# RABBITMQ_ENV = "local" settings = Settings() From e1ef5f05c8ed6e96285562c89d7d97f150c752c5 Mon Sep 17 00:00:00 2001 From: zhouchengrong Date: Mon, 15 Apr 2024 18:39:07 +0800 Subject: [PATCH 4/4] =?UTF-8?q?feat=20generate=20=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- app/core/config.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index fa30e10..0e94af1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,4 +19,4 @@ LABEL maintainer="zchengrong@yeah.net" \ name="trinity_aida" -CMD ["gunicorn", "-c", "gunicorn_config.py", "app.main:app" , "-e", "RABBITMQ_QUEUES=SuperResolution-dev"] \ No newline at end of file +CMD ["gunicorn", "-c", "gunicorn_config.py", "app.main:app" , "-e", "SR_RABBITMQ_QUEUES=SuperResolution" ,"-e", "GI_RABBITMQ_QUEUES=GenerateImage"] \ No newline at end of file diff --git a/app/core/config.py b/app/core/config.py index e286b5d..6bf0556 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -25,9 +25,9 @@ if DEBUG: else: LOGS_PATH = "app/logs/errors.log" -# RABBITMQ_ENV = "" -RABBITMQ_ENV = "dev" -# RABBITMQ_ENV = "local" +RABBITMQ_ENV = "" # 生产环境 +# RABBITMQ_ENV = "-dev" # 开发环境 +# RABBITMQ_ENV = "-local" # 本地测试环境 settings = Settings() @@ -61,7 +61,7 @@ SR_RABBITMQ_QUEUES = os.getenv("SR_RABBITMQ_QUEUES", "SuperResolution-local") GI_MODEL_NAME = '_stable_diffusion' GI_MODEL_URL = '10.1.1.240:7001' GI_MINIO_BUCKET = "aida-users" -GI_RABBITMQ_QUEUES = os.getenv("GI_RABBITMQ_QUEUES", f"GenerateImage-{RABBITMQ_ENV}") +GI_RABBITMQ_QUEUES = os.getenv("GI_RABBITMQ_QUEUES", f"GenerateImage{RABBITMQ_ENV}") # SEG service config SEG_MODEL_URL = '10.1.1.240:10000'