some adjustments for clarity
This commit is contained in:
@@ -41,7 +41,7 @@ class GraphManager:
|
||||
self.correlation_index = {}
|
||||
# Compile regex for date filtering for efficiency
|
||||
self.date_pattern = re.compile(r'^\d{4}-\d{2}-\d{2}[ T]\d{2}:\d{2}:\d{2}')
|
||||
self.EXCLUDED_KEYS = ['confidence', 'provider', 'timestamp', 'type','cert_validity_period_days','cert_source']
|
||||
self.EXCLUDED_KEYS = ['crtsh_cert_validity_period_days','crtsh_cert_source','crtsh_cert_common_name']
|
||||
|
||||
def __getstate__(self):
|
||||
"""Prepare GraphManager for pickling, excluding compiled regex."""
|
||||
|
||||
@@ -396,7 +396,7 @@ class Scanner:
|
||||
if self._is_stop_requested():
|
||||
print(f"Stop requested before processing {target_item}")
|
||||
break
|
||||
self.currently_processing.add(target_item)
|
||||
self.currently_processing.add(task_tuple)
|
||||
|
||||
try:
|
||||
self.current_depth = depth
|
||||
@@ -444,7 +444,7 @@ class Scanner:
|
||||
self.total_tasks_ever_enqueued += 1
|
||||
finally:
|
||||
with self.processing_lock:
|
||||
self.currently_processing.discard(target_item)
|
||||
self.currently_processing.discard(task_tuple)
|
||||
|
||||
if self._is_stop_requested():
|
||||
print("Scan terminated due to stop request")
|
||||
@@ -857,7 +857,11 @@ class Scanner:
|
||||
'graph_statistics': self.graph.get_statistics(),
|
||||
'task_queue_size': self.task_queue.qsize(),
|
||||
'currently_processing_count': currently_processing_count,
|
||||
'currently_processing': currently_processing_list[:5]
|
||||
'currently_processing': currently_processing_list[:5],
|
||||
'tasks_in_queue': self.task_queue.qsize(),
|
||||
'tasks_completed': self.indicators_completed,
|
||||
'tasks_skipped': self.total_tasks_ever_enqueued - self.task_queue.qsize() - self.indicators_completed - self.tasks_re_enqueued,
|
||||
'tasks_rescheduled': self.tasks_re_enqueued,
|
||||
}
|
||||
except Exception as e:
|
||||
print(f"ERROR: Exception in get_scan_status: {e}")
|
||||
@@ -876,7 +880,11 @@ class Scanner:
|
||||
'graph_statistics': {},
|
||||
'task_queue_size': 0,
|
||||
'currently_processing_count': 0,
|
||||
'currently_processing': []
|
||||
'currently_processing': [],
|
||||
'tasks_in_queue': 0,
|
||||
'tasks_completed': 0,
|
||||
'tasks_skipped': 0,
|
||||
'tasks_rescheduled': 0,
|
||||
}
|
||||
|
||||
def _initialize_provider_states(self, target: str) -> None:
|
||||
|
||||
Reference in New Issue
Block a user