Skip to content

Commit 2c63923

Browse files
authored
合并拉取请求 #44
fix #43
2 parents 8b68243 + c4b0551 commit 2c63923

2 files changed

Lines changed: 13 additions & 10 deletions

File tree

apis/utils/post_worker.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"""
44
import datetime
55
import os
6+
import numpy as np
67

78
from sqlalchemy import create_engine
89
from sqlalchemy.orm import sessionmaker
@@ -48,7 +49,8 @@ async def post_worker(task: AsyncTask, started_at: int, target_name: str, ext: s
4849
if task.last_stop in ['stop', 'skip']:
4950
task_status = task.last_stop
5051
try:
51-
results = change_filename(task.results, target_name, ext)
52+
task_results = [task_result for task_result in task.results if not isinstance(task_result, np.ndarray)]
53+
results = change_filename(task_results, target_name, ext)
5254
task.results = results
5355
query = session.query(GenerateRecord).filter(GenerateRecord.task_id == task.task_id).first()
5456
query.start_mills = started_at
@@ -58,8 +60,9 @@ async def post_worker(task: AsyncTask, started_at: int, target_name: str, ext: s
5860
query.result = url_path(results)
5961
finally_result = str(query)
6062
session.commit()
61-
await send_result_to_web_hook(query.webhook_url, finally_result)
63+
await send_result_to_web_hook(str(query.webhook_url), finally_result)
6264
return finally_result
6365
except Exception as e:
6466
print(e)
67+
6568
CurrentTask.ct = None

docker.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The docker image is based on NVIDIA CUDA 12.4 and PyTorch 2.1, see [Dockerfile](
99

1010
## Quick start
1111

12-
**More information in the [notes](#notes).**
12+
**More information in the [notes](#Notes).**
1313

1414
### Running with Docker Compose
1515

@@ -98,13 +98,13 @@ Since `/content/data` is a persistent volume folder, your files will be persiste
9898

9999
### Paths inside the container
100100

101-
|Path|Details|
102-
|-|-|
103-
|/content/app|The application stored folder|
104-
|/content/app/models.org|Original 'models' folder.<br> Files are copied to the '/content/app/models' which is symlinked to '/content/data/models' every time the container boots. (Existing files will not be overwritten.) |
105-
|/content/data|Persistent volume mount point|
106-
|/content/data/models|The folder is symlinked to '/content/app/models'|
107-
|/content/data/outputs|The folder is symlinked to '/content/app/outputs'|
101+
| Path | Details |
102+
|-------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
103+
| /content/app | The application stored folder |
104+
| /content/app/models.org | Original 'models' folder.<br> Files are copied to the '/content/app/models' which is symlinked to '/content/data/models' every time the container boots. (Existing files will not be overwritten.) |
105+
| /content/data | Persistent volume mount point |
106+
| /content/data/models | The folder is symlinked to '/content/app/models' |
107+
| /content/data/outputs | The folder is symlinked to '/content/app/outputs' |
108108

109109
### Environments
110110

0 commit comments

Comments
 (0)