From 458d2bb073d048d724a037bbba1873e66bce18b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=A9=E6=96=87?= Date: Fri, 29 Jul 2022 14:23:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=94=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gsil/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) mode change 100644 => 100755 gsil/__init__.py diff --git a/gsil/__init__.py b/gsil/__init__.py old mode 100644 new mode 100755 index ebc0624..7a25a47 --- a/gsil/__init__.py +++ b/gsil/__init__.py @@ -13,7 +13,6 @@ """ import sys import time -import random import traceback import multiprocessing from .engine import Engine @@ -52,9 +51,11 @@ class instance can't pickle in apply_async exit(0) try: ret = Engine(token=token).search(rule) + lock.acquire() token_dict[token] = False store_result(ret) scan_rule_queue.put(rule) + lock.release() except Exception as e: traceback.print_exc() #return False, None, traceback.format_exc()