Skip to content

Commit

Permalink
remove duplicates from process_list before printing
Browse files Browse the repository at this point in the history
  • Loading branch information
ikagod authored Jan 12, 2024
1 parent eb8458c commit 5710198
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ikabot/helpers/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,7 @@ def updateProcessList(session, programprocesslist=[]):
session.setSessionData(sessionData)

#normalize process list (all processes must have properties pid, action, date and status)
return normalizeDicts(runningIkabotProcessList)
normalized_processes = normalizeDicts(runningIkabotProcessList)
#remove dupes by pid
return list({d['pid']: d for d in normalized_processes}.values())

0 comments on commit 5710198

Please sign in to comment.