=== Summary: 675 files | 7 generated | 484 fresh | 4605 untracked | 4268 adopted | 355 marked | 466 validated-ok | 2+0 stale (sig+body) | 0 skipped | 0 failed | elapsed 11:08:11.442 (40091.44s) ===
This commit is contained in:
@@ -19,6 +19,7 @@ namespace adas_core.Application.Services;
|
||||
/// <summary>
|
||||
/// Provides scheduling functionality as a service to manage and coordinate timed or periodic operations.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=524e1c4 -->
|
||||
public class SchedulerService
|
||||
{
|
||||
private readonly bool _activateCheckExpiredAlerts;
|
||||
@@ -73,6 +74,7 @@ public class SchedulerService
|
||||
/// <param name="httpClientFactory">Factory used to create HTTP clients for provider integrations.</param>
|
||||
/// <param name="calculatedObservationsService">Lazy provider of calculated observations operations.</param>
|
||||
/// <param name="patientProcedureService">Lazy provider of patient care plan operations.</param>
|
||||
/// <!-- aidoc:v1 sig=2ce1d53 body=1abbe4d -->
|
||||
public SchedulerService(IOptions<ApiSettings> apiSettings,
|
||||
IOptions<List<ProvidersSettings>> providersSettings,
|
||||
Lazy<IPatientService> patientService,
|
||||
@@ -167,6 +169,8 @@ public class SchedulerService
|
||||
/// <summary>
|
||||
/// Initializes the Quartz scheduler by wiring up service dependencies for background jobs, creating job and trigger definitions, and conditionally scheduling them based on feature flag configuration settings before starting the scheduler.
|
||||
/// </summary>
|
||||
/// <!-- aidoc-review:v1 severity=low kind=wrong_summary
|
||||
/// "The summary states jobs are scheduled 'before starting the scheduler', but the code starts the scheduler first (await scheduler.Start()) and then calls ScheduleJobs afterwards." -->
|
||||
private async Task InitScheduler()
|
||||
{
|
||||
//TODO con el cambio a .net core y el repaso a la inyección de dependencias de estructure map
|
||||
@@ -398,6 +402,7 @@ public class SchedulerService
|
||||
/// <remarks>
|
||||
/// The DisallowConcurrentExecution attribute prevents overlapping executions of this job.
|
||||
/// </remarks>
|
||||
/// <!-- aidoc:v1 sig=e3fb42b -->
|
||||
[DisallowConcurrentExecution]
|
||||
public class CheckHydricBalanceRyCJob : IJob
|
||||
{
|
||||
@@ -413,6 +418,7 @@ public class CheckHydricBalanceRyCJob : IJob
|
||||
/// All exceptions raised during processing are caught and logged, allowing the job to finish without interrupting the scheduler.
|
||||
/// </summary>
|
||||
/// <param name="context">The Quartz job execution context provided by the scheduler when the job trigger fires.</param>
|
||||
/// <!-- aidoc:v1 sig=1b2454a body=41f8cfc -->
|
||||
public async Task Execute(IJobExecutionContext context)
|
||||
{
|
||||
var start = DateTime.Now;
|
||||
@@ -457,6 +463,7 @@ public class CheckHydricBalanceRyCJob : IJob
|
||||
/// <remarks>
|
||||
/// The DisallowConcurrentExecution attribute ensures that only one instance of this job can execute at any given time.
|
||||
/// </remarks>
|
||||
/// <!-- aidoc:v1 sig=e9c40b0 -->
|
||||
[DisallowConcurrentExecution]
|
||||
public class CheckActiveTreatmentsJob : IJob
|
||||
{
|
||||
@@ -474,6 +481,7 @@ public class CheckActiveTreatmentsJob : IJob
|
||||
/// Executes the scheduled job that iterates through all patients, retrieves their active treatments and the associated medicines (excluding nutrition-type medicines), and calculates medicine observations for each patient. Exceptions are caught and logged without rethrowing, and the total execution duration is logged upon completion.
|
||||
/// </summary>
|
||||
/// <param name="context">The job execution context provided by the scheduler.</param>
|
||||
/// <!-- aidoc:v1 sig=1b2454a body=0440983 -->
|
||||
public async Task Execute(IJobExecutionContext context)
|
||||
{
|
||||
var start = DateTime.Now;
|
||||
@@ -525,6 +533,7 @@ public class CheckActiveTreatmentsJob : IJob
|
||||
/// <remarks>
|
||||
/// The <see cref="DisallowConcurrentExecutionAttribute"/> attribute prevents multiple instances of this job from running at the same time.
|
||||
/// </remarks>
|
||||
/// <!-- aidoc:v1 sig=0dd74bf -->
|
||||
[DisallowConcurrentExecution]
|
||||
public class CheckActiveAppointmentsJob : IJob
|
||||
{
|
||||
@@ -540,6 +549,7 @@ public class CheckActiveAppointmentsJob : IJob
|
||||
/// Executes the scheduled check active appointments job, logging the start and completion times along with the total elapsed time. Any exception thrown during execution is caught and logged without being rethrown.
|
||||
/// </summary>
|
||||
/// <param name="context">The Quartz scheduler context that provides runtime information for the job execution.</param>
|
||||
/// <!-- aidoc:v1 sig=1b2454a body=5d53712 -->
|
||||
public async Task Execute(IJobExecutionContext context)
|
||||
{
|
||||
var start = DateTime.Now;
|
||||
@@ -567,6 +577,7 @@ public class CheckActiveAppointmentsJob : IJob
|
||||
/// <remarks>
|
||||
/// The DisallowConcurrentExecution attribute prevents multiple instances of this job from running simultaneously.
|
||||
/// </remarks>
|
||||
/// <!-- aidoc:v1 sig=df3113f -->
|
||||
[DisallowConcurrentExecution]
|
||||
public class CheckInactivePatientsJob : IJob
|
||||
{
|
||||
@@ -579,6 +590,7 @@ public class CheckInactivePatientsJob : IJob
|
||||
/// Skips processing when another instance is already running, as indicated by the global <c>isCheckingInactivePatients</c> flag, and logs the elapsed execution time.
|
||||
/// </summary>
|
||||
/// <param name="context">The Quartz job execution context whose <see cref="IJobExecutionContext.JobDetail"/> data map supplies the inactivity and discharge thresholds.</param>
|
||||
/// <!-- aidoc:v1 sig=1b2454a body=b1deaf7 -->
|
||||
public async Task Execute(IJobExecutionContext context)
|
||||
{
|
||||
//LogExecutionContext.TrySetTraceIdentifier(Guid.NewGuid().ToString(), true);
|
||||
@@ -617,6 +629,7 @@ public class CheckInactivePatientsJob : IJob
|
||||
/// <remarks>
|
||||
/// The <c>DisallowConcurrentExecution</c> attribute ensures that overlapping executions of this job are prevented, guaranteeing that only one instance runs at a time.
|
||||
/// </remarks>
|
||||
/// <!-- aidoc:v1 sig=ea835b5 -->
|
||||
[DisallowConcurrentExecution]
|
||||
public class CheckOpiateBolusesJob : IJob
|
||||
{
|
||||
@@ -630,6 +643,8 @@ public class CheckOpiateBolusesJob : IJob
|
||||
/// logging any errors that occur and reporting the total execution time upon completion.
|
||||
/// </summary>
|
||||
/// <param name="context">The Quartz job execution context provided by the scheduler for this job run.</param>
|
||||
/// <!-- aidoc-review:v1 severity=low kind=missing_returns
|
||||
/// "The method returns Task but no <returns> tag is provided (low severity since Quartz Execute methods typically have no meaningful return value)." -->
|
||||
public async Task Execute(IJobExecutionContext context)
|
||||
{
|
||||
var start = DateTime.Now;
|
||||
@@ -660,6 +675,7 @@ public class CheckOpiateBolusesJob : IJob
|
||||
/// <remarks>
|
||||
/// The <see cref="DisallowConcurrentExecutionAttribute"/> attribute ensures that only one instance of this job can execute at a given time, preventing overlapping runs that could lead to duplicate processing of expired observations.
|
||||
/// </remarks>
|
||||
/// <!-- aidoc:v1 sig=5ab6b97 -->
|
||||
[DisallowConcurrentExecution]
|
||||
public class CheckExpiredObservationsJob : IJob
|
||||
{
|
||||
@@ -672,6 +688,7 @@ public class CheckExpiredObservationsJob : IJob
|
||||
/// Executes the scheduled job that checks and expires observations, recalculating dependent data. Uses a global flag to prevent concurrent execution of the expiration logic, and logs the start, duration, and any errors encountered.
|
||||
/// </summary>
|
||||
/// <param name="context">The job execution context provided by the scheduler.</param>
|
||||
/// <!-- aidoc:v1 sig=1b2454a body=05b3176 -->
|
||||
public async Task Execute(IJobExecutionContext context)
|
||||
{
|
||||
var start = DateTime.Now;
|
||||
@@ -705,6 +722,7 @@ public class CheckExpiredObservationsJob : IJob
|
||||
/// <summary>
|
||||
/// Job for calculate NEWS based on FR, SPo2, Temperature, Tas and FC
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=3533a62 -->
|
||||
[DisallowConcurrentExecution]
|
||||
public class CalculateNewsJob : IJob
|
||||
{
|
||||
@@ -728,6 +746,7 @@ public class CalculateNewsJob : IJob
|
||||
/// the latest underlying observation is not expired.
|
||||
/// </summary>
|
||||
/// <param name="context">The Quartz job execution context provided by the scheduler.</param>
|
||||
/// <!-- aidoc:v1 sig=1b2454a body=2929244 -->
|
||||
public async Task Execute(IJobExecutionContext context)
|
||||
{
|
||||
//Filter patients in real locations
|
||||
@@ -885,6 +904,7 @@ public class CalculateNewsJob : IJob
|
||||
/// <remarks>
|
||||
/// This job is decorated with the <see cref="DisallowConcurrentExecutionAttribute"/> to prevent overlapping executions of the same job instance.
|
||||
/// </remarks>
|
||||
/// <!-- aidoc:v1 sig=de60ccf -->
|
||||
[DisallowConcurrentExecution]
|
||||
public class CheckExpiredAlertsJob : IJob
|
||||
{
|
||||
@@ -898,6 +918,7 @@ public class CheckExpiredAlertsJob : IJob
|
||||
/// Runs the expiration logic only when the global "isCheckingAlertsExpiration" flag is absent or set to false; any exception is caught and logged without being rethrown.
|
||||
/// </summary>
|
||||
/// <param name="context">The Quartz job execution context provided by the scheduler when the job trigger fires.</param>
|
||||
/// <!-- aidoc:v1 sig=1b2454a body=fe3b1b9 -->
|
||||
public async Task Execute(IJobExecutionContext context)
|
||||
{
|
||||
var start = DateTime.Now;
|
||||
@@ -929,6 +950,7 @@ public class CheckExpiredAlertsJob : IJob
|
||||
/// <remarks>
|
||||
/// The <see cref="DisallowConcurrentExecutionAttribute"/> attribute ensures that the job will not be triggered while a previous execution is still running.
|
||||
/// </remarks>
|
||||
/// <!-- aidoc:v1 sig=36ea806 -->
|
||||
[DisallowConcurrentExecution]
|
||||
public class ArchiveNurseDataJob : IJob
|
||||
{
|
||||
@@ -945,6 +967,7 @@ public class ArchiveNurseDataJob : IJob
|
||||
/// Executes the ArchiveNurseDataJob which archives finished nurse procedures, tests, and treatments for patients whose associated end dates exceed the configured thresholds defined in <see cref="ArchiveNurseDataSettings"/>. Each archive category is only processed when its corresponding setting flag is active, and any exception is caught and logged without interrupting the remaining work.
|
||||
/// </summary>
|
||||
/// <param name="context">The Quartz.NET job execution context that provides runtime information for the scheduled job execution.</param>
|
||||
/// <!-- aidoc:v1 sig=1b2454a body=d478de0 -->
|
||||
public async Task Execute(IJobExecutionContext context)
|
||||
{
|
||||
var start = DateTime.Now;
|
||||
@@ -1053,6 +1076,7 @@ public class ArchiveNurseDataJob : IJob
|
||||
/// Represents a scheduled job that retrieves observations associated with providers.
|
||||
/// </summary>
|
||||
/// <remarks>The DisallowConcurrentExecution attribute prevents overlapping executions of this job instance.</remarks>
|
||||
/// <!-- aidoc:v1 sig=172abfc -->
|
||||
[DisallowConcurrentExecution]
|
||||
public class GetProvidersObservationsJob : IJob
|
||||
{
|
||||
@@ -1073,6 +1097,7 @@ public class GetProvidersObservationsJob : IJob
|
||||
/// skips providers whose type or required constructor cannot be found, and logs and recovers from any exception raised during processing.
|
||||
/// </summary>
|
||||
/// <param name="context">The Quartz job execution context provided by the scheduler when the job is triggered.</param>
|
||||
/// <!-- aidoc:v1 sig=1b2454a body=6326f48 -->
|
||||
public async Task Execute(IJobExecutionContext context)
|
||||
{
|
||||
var start = DateTime.Now;
|
||||
|
||||
Reference in New Issue
Block a user