diff --git a/backend/conf/config.yml b/backend/conf/config.yml
index a51a34c9..9fb0dee5 100644
--- a/backend/conf/config.yml
+++ b/backend/conf/config.yml
@@ -1,25 +1,25 @@
api:
address: "localhost:8000"
mongo:
- host: localhost
+ host: "192.168.235.26"
port: 27017
- db: crawlab_test
- username: ""
- password: ""
+ db: crawlab_local
+ username: "root"
+ password: "example"
authSource: "admin"
redis:
- address: localhost
- password: ""
+ address: 127.0.0.1
+ password:
database: 1
port: 6379
log:
level: info
- path: "/var/logs/crawlab"
+ path: "./logs/crawlab"
isDeletePeriodically: "N"
deleteFrequency: "@hourly"
server:
host: 0.0.0.0
- port: 8000
+ port: 8001
master: "Y"
secret: "crawlab"
register:
@@ -30,11 +30,11 @@ server:
python: "Y"
node: "N"
spider:
- path: "/app/spiders"
+ path: "./spiders"
task:
workers: 4
other:
tmppath: "/tmp"
version: 0.4.3
setting:
- allowRegister: "N"
\ No newline at end of file
+ allowRegister: "N"
diff --git a/backend/services/node.go b/backend/services/node.go
index 515ce9c9..d6124205 100644
--- a/backend/services/node.go
+++ b/backend/services/node.go
@@ -103,7 +103,7 @@ func UpdateNodeStatus() {
model.ResetNodeStatusToOffline(list)
}
-// 处理接到信息
+// 处理节点信息
func handleNodeInfo(key string, data *Data) {
// 添加同步锁
v, err := database.RedisClient.Lock(key)
@@ -186,10 +186,12 @@ func UpdateNodeData() {
debug.PrintStack()
return
}
+
if err := database.RedisClient.HSet("nodes", key, utils.BytesToString(dataBytes)); err != nil {
log.Errorf(err.Error())
return
}
+
}
func MasterNodeCallback(message redis.Message) (err error) {
diff --git a/frontend/.env.development b/frontend/.env.development
index 779d28e4..80220bf8 100644
--- a/frontend/.env.development
+++ b/frontend/.env.development
@@ -1,2 +1,2 @@
NODE_ENV='development'
-VUE_APP_BASE_URL=http://localhost:8000
+VUE_APP_BASE_URL=http://localhost:8001
diff --git a/frontend/src/components/InfoView/SpiderInfoView.vue b/frontend/src/components/InfoView/SpiderInfoView.vue
index 1f29e89c..74e48d08 100644
--- a/frontend/src/components/InfoView/SpiderInfoView.vue
+++ b/frontend/src/components/InfoView/SpiderInfoView.vue
@@ -65,12 +65,15 @@
:file-list="fileList"
style="display:inline-block;margin-right:10px"
>
-