Codeunit 461 Job Queue Cleanup Tasks

Base Application, System.Threading

src/Layers/W1/BaseApp/Modules/System/JobQueue/JobQueueCleanupTasks.Codeunit.al27 lines, Copyright (c) Microsoft Corporation. MIT

namespace System.Threading;codeunit 461 "Job Queue Cleanup Tasks"{    InherentEntitlements = X;    InherentPermissions = X;    TableNo = "Job Queue Entry";    var        JobQueueManagement: Codeunit "Job Queue Management";    trigger OnRun()    begin        if (Rec."Object Type to Run" = Rec."Object Type to Run"::Codeunit) and (Rec."Object ID to Run" = Codeunit::"Job Queue Cleanup Tasks") then            CleanupJQTasks()        else            JobQueueManagement.UpdateRetriableFailedJobQueueLogEntry(Rec);    end;    local procedure CleanupJQTasks()    begin        JobQueueManagement.CheckAndRefreshCategoryRecoveryTasks();        JobQueueManagement.FindStaleJobsAndSetError();    end;}