Add processor heartbeat management and improve health check functionality
All checks were successful
Publish FaceAI Container / publish (push) Successful in 3m7s
All checks were successful
Publish FaceAI Container / publish (push) Successful in 3m7s
- Introduced processor heartbeat configuration in environment variables and Docker setup. - Implemented heartbeat publishing in the processor worker. - Enhanced health check endpoint to include processor availability status. - Updated frontend components to handle processor unavailability messages. - Added legacy return functionality in the upload panel.
This commit is contained in:
parent
c0732c142c
commit
87d9238795
14 changed files with 292 additions and 23 deletions
|
|
@ -304,6 +304,34 @@ function launchFaceAi() {
|
|||
return false;
|
||||
}
|
||||
|
||||
function clearLegacyLoadingState() {
|
||||
$("body").removeClass("loading");
|
||||
}
|
||||
|
||||
function shouldClearLegacyLoadingOnRestore(event) {
|
||||
if (event && event.persisted) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (window.performance && typeof window.performance.getEntriesByType === "function") {
|
||||
var entries = window.performance.getEntriesByType("navigation");
|
||||
if (entries && entries.length && entries[0].type === "back_forward") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function restoreLegacyPageAfterHistoryNavigation(event) {
|
||||
if (!shouldClearLegacyLoadingOnRestore(event)) {
|
||||
return;
|
||||
}
|
||||
|
||||
clearLegacyLoadingState();
|
||||
logFaceAiDebug("Cleared legacy loading state after history navigation");
|
||||
}
|
||||
|
||||
function initFaceAiRaceSearchButton() {
|
||||
var select = $("#tipoPuntoFoto");
|
||||
if (!select.length || $("#faceaiLaunchButton").length || !faceAiFeatureEnabled()) {
|
||||
|
|
@ -529,11 +557,16 @@ function goPage()
|
|||
}
|
||||
|
||||
$(function() {
|
||||
clearLegacyLoadingState();
|
||||
initFaceAiRaceSearchButton();
|
||||
initFaceAiErrorModal();
|
||||
logFaceAiDebug("Legacy race page ready");
|
||||
});
|
||||
|
||||
if (window.addEventListener) {
|
||||
window.addEventListener("pageshow", restoreLegacyPageAfterHistoryNavigation);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue