Skip to content

Commit

Permalink
Merge pull request #16 from novicezk/fix-task-fail
Browse files Browse the repository at this point in the history
Fix task fail
  • Loading branch information
novicezk authored Jun 6, 2023
2 parents 1eee704 + 87916be commit 501eeb1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

1. 下载镜像
```shell
docker pull novicezk/wechat-midjourney:2.0.1
docker pull novicezk/wechat-midjourney:2.0.2
```
2. 启动容器
```shell
Expand All @@ -21,15 +21,15 @@ docker run -d --name wechat-midjourney \
-p 4120:4120 \
-v /xxx/xxx/config:/app/config \
--restart=always \
novicezk/wechat-midjourney:2.0.1
novicezk/wechat-midjourney:2.0.2

# 或启动时添加配置
docker run -d --name wechat-midjourney \
-p 4120:4120 \
-e MJ_PROXY_ENDPOINT=http://172.17.0.1:8080/mj \
-e MJ_NOFIFY_HOOK=http://172.17.0.1:4120/notify \
--restart=always \
novicezk/wechat-midjourney:2.0.1
novicezk/wechat-midjourney:2.0.2
```

3. 查看启动日志,微信扫描二维码,若二维码无法扫码,复制二维码链接浏览器打开扫码
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wechat-midjourney",
"version": "2.0.1",
"version": "2.0.2",
"description": "",
"main": "dist/main.js",
"export": "dist/main.js",
Expand Down
4 changes: 2 additions & 2 deletions src/mj-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class MJApi {
if (status == 'SUBMITTED') {
room.say(`@${userName} \n✅ 您的任务已提交\n✨ ${description}\n🚀 正在快速处理中,请稍后`);
} else if (status == 'FAILURE') {
room.say(`@${userName} \n❌ 任务执行失败\n✨ ${description}`);
room.say(`@${userName} \n❌ 任务执行失败\n✨ ${description}\n📒 失败原因: ${req.body.failReason}`);
} else if (status == 'SUCCESS') {
const time = req.body.finishTime - req.body.submitTime;
if (action == 'UPSCALE') {
Expand All @@ -106,7 +106,7 @@ export class MJApi {
} else {
const taskId = req.body.id;
const prompt = req.body.prompt;
await room.say(`@${userName} \n🎨 ${action == 'IMAGINE' ? '绘图' : '变换'}成功,用时 ${displayMilliseconds(time)}\n✨ Prompt: ${prompt}\n📨 任务ID: ${taskId}\n🪄 放大 U1~U4 ,变换 V1~V4\n✏️ 使用[/up 任务ID 操作]\n/up ${taskId} U1`);
await room.say(`@${userName} \n🎨 ${action == 'IMAGINE' ? '绘图' : '变换'}成功,用时 ${displayMilliseconds(time)}\n✨ Prompt: ${prompt}\n📨 任务ID: ${taskId}\n🪄 放大 U1~U4,变换 V1~V4\n✏️ 使用[/up 任务ID 操作]\n/up ${taskId} U1`);
let image;
if (config.httpProxy) {
image = await this.proxyDownloadImage(req.body.imageUrl);
Expand Down

0 comments on commit 501eeb1

Please sign in to comment.