Skip to content

Commit

Permalink
Another fix of memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanDeveloper committed Jan 30, 2024
1 parent 59317a7 commit 82a074b
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions heidpi/heiDPI_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,25 @@ def get_timestamp():

def heidpi_process_packet_events(json_dict, instance, current_flow, global_user_data):
future = [POOL_PACKET.submit(heidpi_log_event, PACKET_CONFIG, json_dict, SHOW_PACKET_EVENTS, "packet_event_id", "packet_event_name", None)]
done, _ = wait(future, return_when=ALL_COMPLETED)
del done, future
_, _ = wait(future, return_when=ALL_COMPLETED)
gc.collect()
return True

def heidpi_process_flow_events(json_dict, instance, current_flow, global_user_data):
future = [POOL_FLOW.submit(heidpi_log_event, FLOW_CONFIG, json_dict, SHOW_FLOW_EVENTS, "flow_event_id", "flow_event_name", heidpi_flow_processing)]
done, _ = wait(future, return_when=ALL_COMPLETED)
del done, future
_, _ = wait(future, return_when=ALL_COMPLETED)
gc.collect()
return True

def heidpi_process_daemon_events(json_dict, instance, current_flow, global_user_data):
future = [POOL_DAEMON.submit(heidpi_log_event, DAEMON_CONFIG, json_dict, SHOW_DAEMON_EVENTS, "daemon_event_id", "daemon_event_name", None)]
done, _ = wait(future, return_when=ALL_COMPLETED)
del done, future
_, _ = wait(future, return_when=ALL_COMPLETED)
gc.collect()
return True

def heidpi_process_error_events(json_dict, instance, current_flow, global_user_data):
future = [POOL_ERROR.submit(heidpi_log_event, ERROR_CONFIG, json_dict, SHOW_ERROR_EVENTS, "error_event_id", "error_event_name", None)]
done, _ = wait(future, return_when=ALL_COMPLETED)
del done, future
_, _ = wait(future, return_when=ALL_COMPLETED)
gc.collect()
return True

Expand Down

0 comments on commit 82a074b

Please sign in to comment.