Compare commits
16 Commits
dev-ltx
...
6ecb6be59c
| Author | SHA1 | Date | |
|---|---|---|---|
| 6ecb6be59c | |||
| 64285cd5f3 | |||
| fe6a5fb029 | |||
| 5217847d49 | |||
| 0a9fc51310 | |||
| cf052f9632 | |||
| 19a8ea9a93 | |||
| 09ff2f1ab7 | |||
| 109a23197a | |||
|
|
2135a180be | ||
|
|
09032c0564 | ||
|
|
167faa10c8 | ||
|
|
0a048bf37f | ||
|
|
05045dda76 | ||
|
|
30f9a99df2 | ||
|
|
3932b8359a |
44
.gitea/workflows/develop_build_commit.yaml
Normal file
44
.gitea/workflows/develop_build_commit.yaml
Normal file
@@ -0,0 +1,44 @@
|
||||
name: git commit AiDA python develop 分支构建部署
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
|
||||
jobs:
|
||||
scheduled_deploy:
|
||||
runs-on: ubuntu-latest
|
||||
if: "contains(github.event.head_commit.message, '[run build]')"
|
||||
|
||||
env:
|
||||
REMOTE_DEPLOY_PATH: /workspace/Trinity/Fastapi_AiDA_Trinity_Dev
|
||||
|
||||
steps:
|
||||
- name: 1.检出代码
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: 'develop'
|
||||
|
||||
- name: 2.复制文件到服务器
|
||||
uses: appleboy/scp-action@v0.1.7
|
||||
with:
|
||||
host: ${{ secrets.SERVER_HOST }}
|
||||
username: ${{ secrets.SERVER_USER }}
|
||||
password: ${{ secrets.SERVER_PASSWORD }}
|
||||
source: "."
|
||||
target: ${{ env.REMOTE_DEPLOY_PATH }}
|
||||
|
||||
- name: Restart Docker containers
|
||||
uses: appleboy/ssh-action@v0.1.10
|
||||
with:
|
||||
host: ${{ secrets.SERVER_HOST }}
|
||||
username: ${{ secrets.SERVER_USER }}
|
||||
password: ${{ secrets.SERVER_PASSWORD }}
|
||||
script: |
|
||||
# 进入项目目录
|
||||
cd ${{ env.REMOTE_DEPLOY_PATH }}
|
||||
|
||||
docker-compose down 2>&1
|
||||
docker-compose up -d --build --remove-orphans 2>&1
|
||||
|
||||
docker image prune -f 2>&1
|
||||
40
.gitea/workflows/develop_build_manual.yaml
Normal file
40
.gitea/workflows/develop_build_manual.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
name: 手动 AiDA python develop 分支构建部署
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
scheduled_deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
REMOTE_DEPLOY_PATH: /workspace/Trinity/Fastapi_AiDA_Trinity_Dev
|
||||
|
||||
steps:
|
||||
- name: 1.检出代码
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: 'develop'
|
||||
|
||||
- name: 2.复制文件到服务器
|
||||
uses: appleboy/scp-action@v0.1.7
|
||||
with:
|
||||
host: ${{ secrets.SERVER_HOST }}
|
||||
username: ${{ secrets.SERVER_USER }}
|
||||
password: ${{ secrets.SERVER_PASSWORD }}
|
||||
source: "."
|
||||
target: ${{ env.REMOTE_DEPLOY_PATH }}
|
||||
|
||||
- name: 3.重启docker-compose
|
||||
uses: appleboy/ssh-action@v0.1.10
|
||||
with:
|
||||
host: ${{ secrets.SERVER_HOST }}
|
||||
username: ${{ secrets.SERVER_USER }}
|
||||
password: ${{ secrets.SERVER_PASSWORD }}
|
||||
script: |
|
||||
# 进入项目目录
|
||||
cd ${{ env.REMOTE_DEPLOY_PATH }}
|
||||
|
||||
docker-compose down 2>&1
|
||||
docker-compose up -d --build --remove-orphans 2>&1
|
||||
|
||||
docker image prune -f 2>&1
|
||||
42
.gitea/workflows/develop_build_scheduled.yaml
Normal file
42
.gitea/workflows/develop_build_scheduled.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
name: 定时 AiDA python develop 分支构建部署
|
||||
on:
|
||||
# 使用 schedule 触发器,遵循标准的 Cron 格式 (分钟 小时-8 日期 月份 星期)
|
||||
schedule:
|
||||
- cron: '32 9 * * *'
|
||||
|
||||
jobs:
|
||||
scheduled_deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
REMOTE_DEPLOY_PATH: /workspace/Trinity/Fastapi_AiDA_Trinity_Dev
|
||||
|
||||
steps:
|
||||
- name: 1.检出代码
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: 'develop'
|
||||
|
||||
- name: 2.复制文件到服务器
|
||||
uses: appleboy/scp-action@v0.1.7
|
||||
with:
|
||||
host: ${{ secrets.SERVER_HOST }}
|
||||
username: ${{ secrets.SERVER_USER }}
|
||||
password: ${{ secrets.SERVER_PASSWORD }}
|
||||
source: "."
|
||||
target: ${{ env.REMOTE_DEPLOY_PATH }}
|
||||
|
||||
- name: Restart Docker containers
|
||||
uses: appleboy/ssh-action@v0.1.10
|
||||
with:
|
||||
host: ${{ secrets.SERVER_HOST }}
|
||||
username: ${{ secrets.SERVER_USER }}
|
||||
password: ${{ secrets.SERVER_PASSWORD }}
|
||||
script: |
|
||||
# 进入项目目录
|
||||
cd ${{ env.REMOTE_DEPLOY_PATH }}
|
||||
|
||||
docker-compose down 2>&1
|
||||
docker-compose up -d --build --remove-orphans 2>&1
|
||||
|
||||
docker image prune -f 2>&1
|
||||
@@ -37,7 +37,7 @@ else:
|
||||
CHROMADB_PATH = "/chromadb/"
|
||||
|
||||
# RABBITMQ_ENV = "" # 生产环境
|
||||
RABBITMQ_ENV = os.getenv("RABBITMQ_ENV", "-dev")
|
||||
RABBITMQ_ENV = os.getenv("RABBITMQ_ENV", "-prod")
|
||||
# RABBITMQ_ENV = "-local" # 本地测试环境
|
||||
|
||||
if RABBITMQ_ENV == "-dev":
|
||||
|
||||
@@ -212,11 +212,11 @@ def design_generate_v2(request_data):
|
||||
items_response['synthesis_url'] = synthesis_single(item_result['front_image'], item_result['back_image'])
|
||||
# 发送结果给java端
|
||||
url = JAVA_STREAM_API_URL
|
||||
xu_pei_test_url = "https://137f6b5c3490.ngrok-free.app/api/third/party/receiveDesignResults"
|
||||
tianxaing_test_url = "https://d7436c137fb9.ngrok-free.app/api/third/party/receiveDesignResults"
|
||||
# xu_pei_test_url = "https://137f6b5c3490.ngrok-free.app/api/third/party/receiveDesignResults"
|
||||
# tianxaing_test_url = "https://d7436c137fb9.ngrok-free.app/api/third/party/receiveDesignResults"
|
||||
logger.info(f"java 回调 -> {url}")
|
||||
logger.info(f"xupei java 回调 -> {xu_pei_test_url}")
|
||||
logger.info(f"tianxiang java 回调 -> {tianxaing_test_url}")
|
||||
# logger.info(f"xupei java 回调 -> {xu_pei_test_url}")
|
||||
# logger.info(f"tianxiang java 回调 -> {tianxaing_test_url}")
|
||||
|
||||
headers = {
|
||||
'Accept': "*/*",
|
||||
@@ -231,14 +231,14 @@ def design_generate_v2(request_data):
|
||||
# 打印结果
|
||||
logger.info(response.text)
|
||||
|
||||
test_xp_response = post_request(xu_pei_test_url, json_data=items_response, headers=headers)
|
||||
test_response = post_request(tianxaing_test_url, json_data=items_response, headers=headers)
|
||||
# test_xp_response = post_request(xu_pei_test_url, json_data=items_response, headers=headers)
|
||||
# test_response = post_request(tianxaing_test_url, json_data=items_response, headers=headers)
|
||||
|
||||
if test_response:
|
||||
# if test_response:
|
||||
# 打印结果
|
||||
logger.info(f"tianxiang test response : {test_response.text}")
|
||||
if test_xp_response:
|
||||
logger.info(f"xupei test response : {test_xp_response.text}")
|
||||
# logger.info(f"tianxiang test response : {test_response.text}")
|
||||
# if test_xp_response:
|
||||
# logger.info(f"xupei test response : {test_xp_response.text}")
|
||||
|
||||
for step, object in enumerate(objects_data):
|
||||
t = threading.Thread(target=process_object, args=(step, object))
|
||||
|
||||
Reference in New Issue
Block a user