Skip to content

Commit

Permalink
fix: start up cron task register
Browse files Browse the repository at this point in the history
  • Loading branch information
engigu committed Apr 30, 2024
1 parent a9d32c5 commit 5bb15ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ npm run dev
</details>

<details>
<summary>4. docker/docker-compose部署(推荐🍀🍀🍀)</summary>
<summary>4. docker/docker-compose部署(推荐指数🍀🍀🍀🍀🍀)</summary>

<details>
<summary>docker挂载app.ini部署</summary>
Expand Down Expand Up @@ -327,7 +327,7 @@ docker-compose up -d
</details>

<details>
<summary>docker/docker-compose环境变量部署(推荐🍀🍀🍀🍀🍀🍀🍀)</summary>
<summary>docker/docker-compose环境变量部署(推荐指数🍀🍀🍀🍀🍀🍀🍀🍀🍀)</summary>

环境变量介绍

Expand Down Expand Up @@ -361,12 +361,14 @@ docker run -d \
-e MYSQL_PASSWORD=Aa123456 \
-e MYSQL_DB=test_11 \
-e MYSQL_TABLE_PREFIX=message_ \
--name message-nest \
engigu/message-nest:latest

# 正式运行(sqlite)
docker run -d \
-p 8000:8000 \
-v you/path/database.db=conf/database.db \
--name message-nest \
engigu/message-nest:latest
```

Expand Down
5 changes: 3 additions & 2 deletions models/send_tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ func GenerateTaskUniqueID() string {

// AddSendTaskWithID 添加实例的时候添加任务
func AddSendTaskWithID(name string, id string, createdBy string) error {
err := db.Where("id = ?", id).Find(&SendTasks{}).Error
if err == nil {
var etask SendTasks
db.Where("id = ?", id).Take(&etask)
if len(etask.ID) > 0 {
return nil
}
task := SendTasks{
Expand Down

0 comments on commit 5bb15ed

Please sign in to comment.