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()