Process Monitor: optimize process tracking - #156
Conversation
|
Can't we just mark the ones that have died of in some way so that we can completely kill tracking them to begin with? Wasn't that the root cause of the issue that we're still trying to track all - even if they've been dead forever. I feel like the "Top" and "Hours" thing just turns into a configuration thing that alleviates some things but we're still tracking e.g. 6 dead processes? I feel like it's 'fixing' something by working around it in a confusing manner. 🤔 |
Not as easy and conclusive as it seem.This was never meant to be full featured process monitor you have in the system. Because the process info is held in DB - but not its state - the state is periodically checked. So you query the system every n seconds "does this process exists?" and get the answer.What happens if you close the process monitor while having 5 tracked processes open and then re-launch process monitor after one month? It still needs to ask the system if the processes exists or not (and they might, or there might be process with the same number but different image (and we are handling that). My point is, that you still need something like this. Other option would be to add states to DB but that would require bigger rework of the overall logic. |
|
I would say we should store the information about process state to the db. If we know it was closed we should not try to find it out again anymore. If there is a process output older than month then we probably should just remove it. |
Would be worth adding here now @antirotor - can you pick that up? |
MustafaJafar
left a comment
There was a problem hiding this comment.
This works perfectly well!
# Conflicts: # client/ayon_applications/process.py # client/ayon_applications/ui/process_monitor.py
|
With the other process monitor PRs merged - how relevant is this still @iLLiCiTiT ? |
Changelog Description
Add limits to process tracking to make the Process Monitor more responsive. You can set count of the most recent processes to track. Not tracked entries are listed but no status is checked for them.
Additional review information
You can set either count and hours, or set hours to 0 to track just the last x entries.
Testing notes:
Use process monitor with lot of entries, play with the filter values