加入批量运行爬虫

This commit is contained in:
marvzhang
2020-02-22 19:12:24 +08:00
parent 8c059c912e
commit 7a75e643ea
5 changed files with 223 additions and 28 deletions

View File

@@ -212,6 +212,14 @@ const actions = {
param: param
})
},
crawlSelectedSpiders ({ state, dispatch }, payload) {
const { taskParams, runType, nodeIds } = payload
return request.post(`/spiders-run`, {
task_params: taskParams,
run_type: runType,
node_ids: nodeIds
})
},
getTaskList ({ state, commit }, id) {
return request.get(`/spiders/${id}/tasks`)
.then(response => {