mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 13:09:00 +00:00
(executor) Fix removal of stale process heartbeats
This commit is contained in:
parent
e1a155a9c8
commit
85f906ea53
@ -36,11 +36,6 @@ public class ProcessLivenessMonitorActor extends RecordActorPrototype {
|
||||
case Monitor() -> {
|
||||
for (;;) {
|
||||
for (var heartbeat : getProcessHeartbeats()) {
|
||||
if (!heartbeat.isRunning()) continue;
|
||||
|
||||
var processId = heartbeat.getProcessId();
|
||||
if (null == processId) continue;
|
||||
|
||||
if (heartbeat.lastSeenMillis() > TimeUnit.DAYS.toMillis(1)) {
|
||||
// This process has been MIA for a long time
|
||||
// ... so we delete it from the listing altogether
|
||||
@ -49,6 +44,11 @@ public class ProcessLivenessMonitorActor extends RecordActorPrototype {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!heartbeat.isRunning()) continue;
|
||||
|
||||
var processId = heartbeat.getProcessId();
|
||||
if (null == processId) continue;
|
||||
|
||||
if (processService.isRunning(processId) && heartbeat.lastSeenMillis() < 10_000)
|
||||
continue;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user