From c532d0614d8ecc8a12e4d92136f6dc29e2fe7ed7 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Tue, 12 Mar 2019 13:01:18 +0800 Subject: [PATCH] fixed deploy issue --- crawlab/tasks/spider.py | 2 +- frontend/src/components/InfoView/SpiderInfoView.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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`) })