Skip to content

Commit

Permalink
fix problem adding flows to the correct timewindow
Browse files Browse the repository at this point in the history
  • Loading branch information
AlyaGomaa committed Jan 27, 2024
1 parent 20a4794 commit 5e78118
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 193 deletions.
6 changes: 3 additions & 3 deletions slips_files/core/database/database_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,8 +664,8 @@ def add_new_older_tw(self, *args, **kwargs):
def add_new_tw(self, *args, **kwargs):
return self.rdb.add_new_tw(*args, **kwargs)

def getTimeTW(self, *args, **kwargs):
return self.rdb.getTimeTW(*args, **kwargs)
def get_tw_start_time(self, *args, **kwargs):
return self.rdb.get_tw_start_time(*args, **kwargs)

def getAmountTW(self, *args, **kwargs):
return self.rdb.getAmountTW(*args, **kwargs)
Expand Down Expand Up @@ -892,7 +892,7 @@ def get_branch(self, *args, **kwargs):
return self.rdb.get_branch(*args, **kwargs)

def add_alert(self, alert: dict):
twid_starttime: float = self.rdb.getTimeTW(alert['profileid'], alert['twid'])
twid_starttime: float = self.rdb.get_tw_start_time(alert['profileid'], alert['twid'])
twid_endtime: float = twid_starttime + RedisDB.width
alert.update({'tw_start': twid_starttime, 'tw_end': twid_endtime})
return self.sqlite.add_alert(alert)
Expand Down
2 changes: 1 addition & 1 deletion slips_files/core/database/redis_db/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ def get_disabled_modules(self) -> list:
else:
return {}

def set_input_metadata(self, info:dict):
def set_input_metadata(self, info: dict):
"""
sets name, size, analysis dates, and zeek_dir in the db
"""
Expand Down
Loading

0 comments on commit 5e78118

Please sign in to comment.