mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-24 05:18:58 +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() -> {
|
case Monitor() -> {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
for (var heartbeat : getProcessHeartbeats()) {
|
for (var heartbeat : getProcessHeartbeats()) {
|
||||||
if (!heartbeat.isRunning()) continue;
|
|
||||||
|
|
||||||
var processId = heartbeat.getProcessId();
|
|
||||||
if (null == processId) continue;
|
|
||||||
|
|
||||||
if (heartbeat.lastSeenMillis() > TimeUnit.DAYS.toMillis(1)) {
|
if (heartbeat.lastSeenMillis() > TimeUnit.DAYS.toMillis(1)) {
|
||||||
// This process has been MIA for a long time
|
// This process has been MIA for a long time
|
||||||
// ... so we delete it from the listing altogether
|
// ... so we delete it from the listing altogether
|
||||||
@ -49,6 +44,11 @@ public class ProcessLivenessMonitorActor extends RecordActorPrototype {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!heartbeat.isRunning()) continue;
|
||||||
|
|
||||||
|
var processId = heartbeat.getProcessId();
|
||||||
|
if (null == processId) continue;
|
||||||
|
|
||||||
if (processService.isRunning(processId) && heartbeat.lastSeenMillis() < 10_000)
|
if (processService.isRunning(processId) && heartbeat.lastSeenMillis() < 10_000)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user