diff --git a/CHANGELOG-zh.md b/CHANGELOG-zh.md index 7c1cbdd8..c963f207 100644 --- a/CHANGELOG-zh.md +++ b/CHANGELOG-zh.md @@ -7,8 +7,12 @@ - **版本升级检测**. 检测最新版本,通知用户升级. - **批量操作爬虫**. 允许用户批量运行/停止爬虫任务,以及批量删除爬虫. - **复制爬虫**. 允许用户复制已存在爬虫来创建新爬虫. +- **微信群二维码**. ### Bug 修复 +- **定时任务爬虫选择问题**. 字段不会随着爬虫变化而响应. +- **定时任务冲突问题**. 两个不同的爬虫设置定时任务,时间设置成相同的话,可能会有bug. [#515](https://github.com/crawlab-team/crawlab/issues/515) [#565](https://github.com/crawlab-team/crawlab/issues/565) +- **任务日志问题**. 在同一时间触发的不同任务可能会写入同一个日志文件. [#577](https://github.com/crawlab-team/crawlab/issues/577) # 0.4.6 (2020-02-13) ### 功能 / 优化 diff --git a/CHANGELOG.md b/CHANGELOG.md index bd2fc69c..1d4bb06b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,12 @@ - **Upgrade Check**. Check latest version and notifiy users to upgrade. - **Spiders Batch Operation**. Allow users to run/stop spider tasks and delete spiders in batches. - **Copy Spiders**. Allow users to copy an existing spider to create a new one. +- **Wechat Group QR Code**. ### Bug Fixes +- **Schedule Spider Selection Issue**. Fields not responding to spider change. +- **Cron Jobs Conflict**. Possible bug when two spiders set to the same time of their cron jobs. [#515](https://github.com/crawlab-team/crawlab/issues/515) [#565](https://github.com/crawlab-team/crawlab/issues/565) +- **Task Log Issue**. Different tasks write to the same log file if triggered at the same time. [#577](https://github.com/crawlab-team/crawlab/issues/577) # 0.4.6 (2020-02-13) ### Features / Enhancement diff --git a/backend/services/task.go b/backend/services/task.go index 3bcdc8d6..f9bab5ce 100644 --- a/backend/services/task.go +++ b/backend/services/task.go @@ -313,13 +313,13 @@ func MakeLogDir(t model.Task) (fileDir string, err error) { } // 获取日志文件路径 -func GetLogFilePaths(fileDir string) (filePath string) { +func GetLogFilePaths(fileDir string, t model.Task) (filePath string) { // 时间戳 ts := time.Now() tsStr := ts.Format("20060102150405") // stdout日志文件 - filePath = filepath.Join(fileDir, tsStr+".log") + filePath = filepath.Join(fileDir, t.Id+"_"+tsStr+".log") return filePath } @@ -419,7 +419,7 @@ func ExecuteTask(id int) { return } // 获取日志文件路径 - t.LogPath = GetLogFilePaths(fileDir) + t.LogPath = GetLogFilePaths(fileDir, t) // 工作目录 cwd := filepath.Join( @@ -571,7 +571,7 @@ func GetTaskLog(id string) (logStr string, err error) { log.Errorf(err.Error()) } - fileP := GetLogFilePaths(fileDir) + fileP := GetLogFilePaths(fileDir, task) // 获取日志文件路径 fLog, err := os.Create(fileP) diff --git a/frontend/src/components/Cron/index.vue b/frontend/src/components/Cron/index.vue index 642a2092..341a364d 100644 --- a/frontend/src/components/Cron/index.vue +++ b/frontend/src/components/Cron/index.vue @@ -6,6 +6,10 @@ z-index: 1; } + .cron-wrapper { + margin-bottom: 10px; + } + .el-tabs { box-shadow: none; } @@ -41,7 +45,14 @@