From 4520c45acc115d0fc766eae30788468a77690433 Mon Sep 17 00:00:00 2001 From: LxL Date: Wed, 26 Jun 2019 04:34:58 +0800 Subject: [PATCH] Avoid cancelling running jobs of all projects (#346) --- scrapyd/webservice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrapyd/webservice.py b/scrapyd/webservice.py index 1df2323e..4dd575fe 100644 --- a/scrapyd/webservice.py +++ b/scrapyd/webservice.py @@ -72,7 +72,7 @@ def render_POST(self, txrequest): prevstate = "pending" spiders = self.root.launcher.processes.values() for s in spiders: - if s.job == jobid: + if s.project == project and s.job == jobid: s.transport.signalProcess(signal) prevstate = "running" return {"node_name": self.root.nodename, "status": "ok", "prevstate": prevstate}