diff --git a/crawlab/tasks/spider.py b/crawlab/tasks/spider.py index dd8a1c4e..acc8c1b5 100644 --- a/crawlab/tasks/spider.py +++ b/crawlab/tasks/spider.py @@ -41,7 +41,7 @@ def execute_spider(self, id: str): '_id': task_id, 'spider_id': ObjectId(id), 'create_ts': datetime.now(), - 'node_id': hostname, + 'node_id': 'celery@%s' % hostname, 'hostname': hostname, 'log_file_path': log_file_path, }) diff --git a/frontend/src/components/InfoView/SpiderInfoView.vue b/frontend/src/components/InfoView/SpiderInfoView.vue index 4f941c3c..d5d1fc71 100644 --- a/frontend/src/components/InfoView/SpiderInfoView.vue +++ b/frontend/src/components/InfoView/SpiderInfoView.vue @@ -138,7 +138,7 @@ export default { cancelButtonText: 'Cancel' }) .then(() => { - this.$store.dispatch('spider/crawlSpider', row._id.$oid) + this.$store.dispatch('spider/deploySpider', row._id.$oid) .then(() => { this.$message.success(`Spider "${row._id.$oid}" has been deployed`) })