Merge pull request #19 from crawlab-team/master

合并源码
This commit is contained in:
暗音
2020-01-08 09:38:08 +08:00
committed by GitHub
9 changed files with 12 additions and 43 deletions

View File

@@ -15,6 +15,9 @@
- **定时任务问题**. [#423](https://github.com/crawlab-team/crawlab/issues/423)
- **上传爬虫zip文件问题**. [#403](https://github.com/crawlab-team/crawlab/issues/403) [#407](https://github.com/crawlab-team/crawlab/issues/407)
- **因为网络原因导致崩溃**. [#340](https://github.com/crawlab-team/crawlab/issues/340)
- **定时任务无法正常运行**
- **定时任务列表列表错位问题**
- **刷新按钮跳转错误问题**
# 0.4.2 (2019-12-26)
### 功能 / 优化

View File

@@ -15,6 +15,9 @@
- **Schedule Cron Task Issue**. [#423](https://github.com/crawlab-team/crawlab/issues/423)
- **Upload Spider Zip File Issue**. [#403](https://github.com/crawlab-team/crawlab/issues/403) [#407](https://github.com/crawlab-team/crawlab/issues/407)
- **Exit due to Network Failure**. [#340](https://github.com/crawlab-team/crawlab/issues/340)
- **Cron Jobs not Running Correctly**
- **Schedule List Columns Mis-positioned**
- **Clicking Refresh Button Redirected to 404 Page**
# 0.4.2 (2019-12-26)
### Features / Enhancement

View File

@@ -15,7 +15,7 @@ WORKDIR /app
# install frontend
RUN npm config set unsafe-perm true
RUN npm install -g yarn && yarn install --registry=https://registry.npm.taobao.org # --sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
RUN npm install -g yarn && yarn install
RUN npm run build:prod
@@ -37,7 +37,7 @@ RUN apt-get update \
&& ln -s /usr/bin/python3 /usr/local/bin/python
# install backend
RUN pip install scrapy pymongo bs4 requests -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip install scrapy pymongo bs4 requests
# copy backend files
COPY --from=backend-build /go/bin/crawlab /usr/local/bin

View File

@@ -23,7 +23,6 @@ var scheduleList = []model.Schedule{
EntryId: 10,
// 前端展示
SpiderName: "test scedule",
NodeName: "测试节点",
CreateTs: time.Now(),
UpdateTs: time.Now(),
@@ -37,7 +36,6 @@ var scheduleList = []model.Schedule{
EntryId: 10,
// 前端展示
SpiderName: "test scedule2",
NodeName: "测试节点",
CreateTs: time.Now(),
UpdateTs: time.Now(),

View File

@@ -80,7 +80,6 @@ func TestPostSchedule(t *testing.T) {
EntryId: 10,
// 前端展示
SpiderName: "test scedule",
NodeName: "测试节点",
CreateTs: time.Now(),
UpdateTs: time.Now(),
@@ -117,7 +116,6 @@ func TestPutSchedule(t *testing.T) {
EntryId: 10,
// 前端展示
SpiderName: "test scedule",
NodeName: "测试节点",
CreateTs: time.Now(),
UpdateTs: time.Now(),

View File

@@ -39,11 +39,6 @@ func AddScheduleTask(s model.Schedule) func() {
if err := AddTask(t); err != nil {
return
}
if err := AssignTask(t); err != nil {
log.Errorf(err.Error())
debug.PrintStack()
return
}
}
} else if s.RunType == constants.RunTypeRandom {
// 随机
@@ -57,11 +52,6 @@ func AddScheduleTask(s model.Schedule) func() {
debug.PrintStack()
return
}
if err := AssignTask(t); err != nil {
log.Errorf(err.Error())
debug.PrintStack()
return
}
} else if s.RunType == constants.RunTypeSelectedNodes {
// 指定节点
for _, nodeId := range s.NodeIds {
@@ -75,33 +65,10 @@ func AddScheduleTask(s model.Schedule) func() {
if err := AddTask(t); err != nil {
return
}
// AddTask 方法已执行AssignTask
//if err := AssignTask(t); err != nil {
// log.Errorf(err.Error())
// debug.PrintStack()
// return
//}
}
} else {
return
}
//node, err := model.GetNodeByKey(s.NodeKey)
//if err != nil || node.Id.Hex() == "" {
// log.Errorf("get node by key error: %s", err.Error())
// debug.PrintStack()
// return
//}
//
//spider := model.GetSpiderByName(s.SpiderName)
//if spider == nil || spider.Id.Hex() == "" {
// log.Errorf("get spider by name error: %s", err.Error())
// debug.PrintStack()
// return
//}
//
//// 同步ID到定时任务
//s.SyncNodeIdAndSpiderId(node, *spider)
}
}

View File

@@ -15,8 +15,6 @@ services:
depends_on:
- mongo
- redis
volumes:
- "/Users/marvzhang/projects/crawlab-team/crawlab/docker_init.sh:/app/docker_init.sh"
worker:
image: tikazyq/crawlab:latest
container_name: worker

View File

@@ -1,2 +1,2 @@
NODE_ENV='development'
VUE_APP_BASE_URL=http://localhost:8001
VUE_APP_BASE_URL=http://localhost:8000

View File

@@ -40,7 +40,9 @@
data-color-scheme="no-preference: light; light: light; dark: dark;"
data-size="large"
data-show-count="true"
:aria-label="$t('Star crawlab-team/crawlab on GitHub')">
:aria-label="$t('Star crawlab-team/crawlab on GitHub')"
style="color: white"
>
Star
</github-button>
</div>