Skip to content

Commit e4b1bb5

Browse files
authored
Merge pull request #1035 from crawlab-team/develop
Develop
2 parents aea571d + 6c1f78b commit e4b1bb5

File tree

14 files changed

+131
-19
lines changed

14 files changed

+131
-19
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ RUN wget https://github.com/crawlab-team/resources/raw/main/seaweedfs/2.79/linux
4949

5050
# install backend
5151
RUN pip install scrapy pymongo bs4 requests
52-
RUN pip install crawlab-sdk==0.6.b20211213-2123
52+
RUN pip install crawlab-sdk==0.6.b20211224-1500
5353

5454
# add files
5555
COPY ./backend/conf /app/backend/conf

Dockerfile.cn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ RUN wget https://github.com/crawlab-team/resources/raw/main/seaweedfs/2.79/linux
4949

5050
# install backend
5151
RUN pip install scrapy pymongo bs4 requests -i https://mirrors.aliyun.com/pypi/simple
52-
RUN pip install crawlab-sdk==0.6.b20211213-2123
52+
RUN pip install crawlab-sdk==0.6.b20211224-1500
5353

5454
# add files
5555
COPY ./backend/conf /app/backend/conf

Dockerfile.local

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ RUN wget https://github.com/crawlab-team/resources/raw/main/seaweedfs/2.79/linux
4949

5050
# install backend
5151
RUN pip install scrapy pymongo bs4 requests -i https://mirrors.aliyun.com/pypi/simple
52-
RUN pip install crawlab-sdk==0.6.b20211213-2123
52+
RUN pip install crawlab-sdk==0.6.b20211224-1500
5353

5454
# add files
5555
COPY ./backend/conf /app/backend/conf

backend/cmd/root.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package cmd
22

33
import (
44
"fmt"
5+
"github.com/apex/log"
56
"strings"
67

78
"github.com/spf13/cobra"
@@ -54,4 +55,17 @@ func initConfig() {
5455
if err := viper.ReadInConfig(); err == nil {
5556
fmt.Println("Using config file:", viper.ConfigFileUsed())
5657
}
58+
59+
// initialize log level
60+
initLogLevel()
61+
}
62+
63+
func initLogLevel() {
64+
// set log level
65+
logLevel := viper.GetString("log.level")
66+
l, err := log.ParseLevel(logLevel)
67+
if err != nil {
68+
l = log.InfoLevel
69+
}
70+
log.SetLevel(l)
5771
}

backend/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.16
44

55
require (
66
github.com/apex/log v1.9.0
7-
github.com/crawlab-team/crawlab-core v0.6.0-beta.20211219.2134
7+
github.com/crawlab-team/crawlab-core v0.6.0-beta.20211224.1718
88
github.com/crawlab-team/go-trace v0.1.1
99
github.com/gin-gonic/gin v1.7.1
1010
github.com/spf13/cobra v1.1.3

backend/go.mod.local

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ replace (
1111

1212
require (
1313
github.com/apex/log v1.9.0
14-
github.com/crawlab-team/crawlab-core v0.6.0-beta.20211213.2006
15-
github.com/crawlab-team/go-trace v0.1.0
14+
github.com/crawlab-team/crawlab-core v0.6.0-beta.20211219.2134
15+
github.com/crawlab-team/go-trace v0.1.1
1616
github.com/gin-gonic/gin v1.7.1
1717
github.com/spf13/cobra v1.1.3
1818
github.com/spf13/viper v1.7.1
19-
go.mongodb.org/mongo-driver v1.6.0 // indirect
2019
go.uber.org/dig v1.10.0
2120
)

backend/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfc
6363
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
6464
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
6565
github.com/crawlab-team/crawlab-core v0.0.1/go.mod h1:6dJHMvrmIJbfYHhYNeGZkGOLEBvur+yGiFzLCRXx92k=
66-
github.com/crawlab-team/crawlab-core v0.6.0-beta.20211219.2134 h1:J2NKuIhkXZPlfx9hHT2L4VLS9FMHzEaDGgHP/8ZJKkI=
67-
github.com/crawlab-team/crawlab-core v0.6.0-beta.20211219.2134/go.mod h1:Y/3Z1WPYvSas5pQtRNypgQoyS3JHvrk2wtdR8n94sHY=
66+
github.com/crawlab-team/crawlab-core v0.6.0-beta.20211224.1718 h1:nNmFoR/o+xEZ6ywe9mwx0QroF+QSHrJR5DotOm/r/tg=
67+
github.com/crawlab-team/crawlab-core v0.6.0-beta.20211224.1718/go.mod h1:Y/3Z1WPYvSas5pQtRNypgQoyS3JHvrk2wtdR8n94sHY=
6868
github.com/crawlab-team/crawlab-db v0.0.2/go.mod h1:o7o4rbcyAWlFGHg9VS7V7tM/GqRq+N2mnAXO71cZA78=
6969
github.com/crawlab-team/crawlab-db v0.1.3 h1:RqLoXGZEMUH1B8SQB5OcNmJeyY2xILvwyhv4X9faWl4=
7070
github.com/crawlab-team/crawlab-db v0.1.3/go.mod h1:kPkGZ1P802XdbFFb8byMpZfNG2lWTNoWNRy4beS0/QY=

backend/test/config-worker-03.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"key": "worker-03",
3+
"is_master": false,
4+
"name": "Worker Node 03",
5+
"ip": "",
6+
"mac": "",
7+
"hostname": "",
8+
"description": "",
9+
"auth_key": "Crawlab2021!"
10+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# 更新日志 (v0.6.0-beta.20211224)
2+
3+
## 概览
4+
5+
这是下个重大版本 v0.6.0 的第三次 beta 发布。伴随着更多功能和优化,正式版本 v0.6.0 将会很快发布了。
6+
7+
## 升级优化
8+
9+
- [x] **国际化**. 支持中文.
10+
- [x] **命令行工具上传爬虫**. [#1020](https://github.com/crawlab-team/crawlab/issues/1020)
11+
- [x] **官方插件**. 允许用户在 Crawlab 用户界面上安装 [官方插件](https://docs-next.crawlab.cn/zh/guide/use-crawlab/public-plugins/).
12+
- [x] **更多文档**. 加入了关于插件和命令行工具的文档.
13+
14+
## Bug 修复
15+
16+
- [x] **上传文件问题** [#990](https://github.com/crawlab-team/crawlab/issues/990) [#1014](https://github.com/crawlab-team/crawlab/issues/1014) [#1022](https://github.com/crawlab-team/crawlab/issues/1022)
17+
- [x] **无法重命名文件** [#1008](https://github.com/crawlab-team/crawlab/issues/1008)
18+
19+
## TODOs
20+
- [ ] **关联任务**. 如果任务执行模式为 “所有节点” 或 “指定节点”,那么将会有主任务和子任务之分。
21+
- [ ] **Crontab 编辑器**. 可视化 Crontab 编辑的前端组件。
22+
- [ ] **结果去重**.
23+
- [ ] **环境变量**.
24+
- [ ] **前端易用性优化**. 更多高级功能,例如表格形式保存。
25+
- [ ] **日志自动清理**.
26+
- [ ] **跟多文档**.
27+
- [ ] **前端输出文件大小优化**.
28+
29+
## 未来计划
30+
31+
下一个版本有可能是 v0.6.0 的正式版本,但是没有确定。本次发布版本将会进行更多的测试,以保证其健壮性以及生产可用。
32+

changelog/v0.6.0-beta.20211224.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Change Log (v0.6.0-beta.20211224)
2+
3+
## Overview
4+
5+
This is the third beta release for the next major version v0.6.0. With more features and optimization coming in, the release of official version v0.6.0 is approaching soon.
6+
7+
## Enhancement
8+
9+
- [x] **Internationalization**. Support Chinese.
10+
- [x] **CLI Upload Spider**. [#1020](https://github.com/crawlab-team/crawlab/issues/1020)
11+
- [x] **Official Plugins**. Allow users to install [official plugins](https://docs-next.crawlab.cn/en/guide/use-crawlab/public-plugins/) on Crawlab web UI.
12+
- [x] **More Documentation**. Added documentation for plugins and CLI.
13+
14+
## Bug Fixes
15+
16+
- [x] **Upload File Issue** [#990](https://github.com/crawlab-team/crawlab/issues/990) [#1014](https://github.com/crawlab-team/crawlab/issues/1014) [#1022](https://github.com/crawlab-team/crawlab/issues/1022)
17+
- [x] **Unable to Rename File** [#1008](https://github.com/crawlab-team/crawlab/issues/1008)
18+
19+
## TODOs
20+
- [ ] **Associated Tasks**. There will be main tasks and their sub-tasks if task mode is "all nodes" or "selected nodes".
21+
- [ ] **Crontab Editor**. Frontend component that visualize the crontab editing.
22+
- [ ] **Results Deduplication**.
23+
- [ ] **Environment Variables**.
24+
- [ ] **Frontend Utility Enhancement**. Advanced features such as saved table customization.
25+
- [ ] **Log Auto Cleanup**.
26+
- [ ] **More Documentation**.
27+
- [ ] **E2E Tests**.
28+
- [ ] **Frontend Output File Size Optimization**.
29+
30+
## What Next
31+
32+
The next version could the official release of v0.6.0, but not determined yet. There will be more tests running against the current beta version to ensure robustness and production-ready deployment.

0 commit comments

Comments
 (0)