updated methodologies of deployment and running spider

This commit is contained in:
Marvin Zhang
2019-03-05 13:22:23 +08:00
parent 95cf526013
commit de3247269c
14 changed files with 193 additions and 111 deletions

View File

@@ -87,10 +87,8 @@ const actions = {
})
},
crawlSpider ({ state, dispatch }, payload) {
const { id, nodeId } = payload
return request.post(`/spiders/${id}/crawl`, {
node_id: nodeId
})
const { id } = payload
return request.post(`/spiders/${id}/on_crawl`)
.then(response => {
console.log(response.data)
})
@@ -124,6 +122,12 @@ const actions = {
.then(response => {
console.log(response)
})
},
deployAll () {
return request.post('/spiders/manage/deploy_all')
.then(response => {
console.log(response)
})
}
}