Compare commits

..

No commits in common. "dev" and "discipline-dev1.0.16" have entirely different histories.

6 changed files with 5 additions and 30 deletions

View file

@ -889,10 +889,6 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
RespondentType = data.RespondentType.Trim().ToUpper(),
Organization = data.Organization,
RootDnaId = data.RootDnaId,
Child1DnaId = data.Child1DnaId,
Child2DnaId = data.Child2DnaId,
Child3DnaId = data.Child3DnaId,
Child4DnaId = data.Child4DnaId,
ConsideredAgency = data.ConsideredAgency,
OrganizationId = data.OrganizationId,
ConsideredAgencyId = data.ConsideredAgencyId,

View file

@ -121,7 +121,7 @@ var builder = WebApplication.CreateBuilder(args);
DashboardJobListLimit = 50000,
TransactionTimeout = TimeSpan.FromMinutes(1),
InvisibilityTimeout = TimeSpan.FromHours(3),
TablesPrefix = "Hangfire_Discipline"
TablesPrefix = "Hangfire"
})));
builder.Services.AddHangfireServer();
}

View file

@ -30,7 +30,6 @@ using RabbitMQ.Client.Events;
using Swashbuckle.AspNetCore.Annotations;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics;
using System.Reflection.Metadata.Ecma335;
using System.Security.Claims;
using System.Text;
using System.Threading.Tasks;
@ -780,16 +779,6 @@ namespace BMA.EHR.Leave.Service.Controllers
{
try
{
// var get current status
var task = await _checkInJobStatusRepository.GetByTaskIdAsync(job.TaskId);
// return if stask status != "PENDING"
if (task is not null)
{
if (task.Status != "PENDING")
continue;
}
// อ่านข้อมูลเดิมจาก AdditionalData
if (string.IsNullOrEmpty(job.AdditionalData))
{
@ -1086,9 +1075,6 @@ namespace BMA.EHR.Leave.Service.Controllers
try
{
// อัปเดตสถานะเป็น PROCESSING
if (taskId != Guid.Empty)
{

View file

@ -11,22 +11,15 @@ public class NotificationService
private readonly ILogger<NotificationService> _logger;
private readonly IConfiguration _configuration;
private string _notifyEndpoint;
private const string NotifyEndpoint = "https://hrmsbkk.case-collection.com/api/v1/org/through-socket/notify-from-token";
public NotificationService(IHttpClientFactory httpClientFactory, ILogger<NotificationService> logger, IConfiguration configuration)
{
_httpClientFactory = httpClientFactory;
_logger = logger;
_configuration = configuration;
_notifyEndpoint = $"{_configuration["API"]}/org/through-socket/notify-from-token";
}
/// <summary>
/// SendNotificationAsync
/// </summary>
/// <param name="token"></param>
/// <param name="error"></param>
/// <param name="message"></param>
public async Task SendNotificationAsync(string? token, bool error, string message)
{
if (string.IsNullOrEmpty(token))
@ -49,7 +42,7 @@ public class NotificationService
var json = JsonConvert.SerializeObject(payload);
var content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PostAsync(_notifyEndpoint, content);
var response = await client.PostAsync(NotifyEndpoint, content);
if (!response.IsSuccessStatusCode)
{

View file

@ -121,7 +121,7 @@ var builder = WebApplication.CreateBuilder(args);
PrepareSchemaIfNecessary = true,
DashboardJobListLimit = 50000,
TransactionTimeout = TimeSpan.FromMinutes(1),
TablesPrefix = "Hangfire_Placement"
TablesPrefix = "Hangfire"
})));
builder.Services.AddHangfireServer();
}

View file

@ -130,7 +130,7 @@ var builder = WebApplication.CreateBuilder(args);
DashboardJobListLimit = 50000,
TransactionTimeout = TimeSpan.FromMinutes(1),
InvisibilityTimeout = TimeSpan.FromHours(3),
TablesPrefix = "Hangfire_Retirement"
TablesPrefix = "Hangfire"
})));
builder.Services.AddHealthChecks();
}