Compare commits
No commits in common. "dev" and "discipline-dev1.0.16" have entirely different histories.
dev
...
discipline
6 changed files with 5 additions and 30 deletions
|
|
@ -889,10 +889,6 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
|
||||||
RespondentType = data.RespondentType.Trim().ToUpper(),
|
RespondentType = data.RespondentType.Trim().ToUpper(),
|
||||||
Organization = data.Organization,
|
Organization = data.Organization,
|
||||||
RootDnaId = data.RootDnaId,
|
RootDnaId = data.RootDnaId,
|
||||||
Child1DnaId = data.Child1DnaId,
|
|
||||||
Child2DnaId = data.Child2DnaId,
|
|
||||||
Child3DnaId = data.Child3DnaId,
|
|
||||||
Child4DnaId = data.Child4DnaId,
|
|
||||||
ConsideredAgency = data.ConsideredAgency,
|
ConsideredAgency = data.ConsideredAgency,
|
||||||
OrganizationId = data.OrganizationId,
|
OrganizationId = data.OrganizationId,
|
||||||
ConsideredAgencyId = data.ConsideredAgencyId,
|
ConsideredAgencyId = data.ConsideredAgencyId,
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ var builder = WebApplication.CreateBuilder(args);
|
||||||
DashboardJobListLimit = 50000,
|
DashboardJobListLimit = 50000,
|
||||||
TransactionTimeout = TimeSpan.FromMinutes(1),
|
TransactionTimeout = TimeSpan.FromMinutes(1),
|
||||||
InvisibilityTimeout = TimeSpan.FromHours(3),
|
InvisibilityTimeout = TimeSpan.FromHours(3),
|
||||||
TablesPrefix = "Hangfire_Discipline"
|
TablesPrefix = "Hangfire"
|
||||||
})));
|
})));
|
||||||
builder.Services.AddHangfireServer();
|
builder.Services.AddHangfireServer();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ using RabbitMQ.Client.Events;
|
||||||
using Swashbuckle.AspNetCore.Annotations;
|
using Swashbuckle.AspNetCore.Annotations;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Reflection.Metadata.Ecma335;
|
|
||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
@ -780,16 +779,6 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
{
|
{
|
||||||
try
|
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
|
// อ่านข้อมูลเดิมจาก AdditionalData
|
||||||
if (string.IsNullOrEmpty(job.AdditionalData))
|
if (string.IsNullOrEmpty(job.AdditionalData))
|
||||||
{
|
{
|
||||||
|
|
@ -1086,9 +1075,6 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// อัปเดตสถานะเป็น PROCESSING
|
// อัปเดตสถานะเป็น PROCESSING
|
||||||
if (taskId != Guid.Empty)
|
if (taskId != Guid.Empty)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -11,22 +11,15 @@ public class NotificationService
|
||||||
private readonly ILogger<NotificationService> _logger;
|
private readonly ILogger<NotificationService> _logger;
|
||||||
private readonly IConfiguration _configuration;
|
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)
|
public NotificationService(IHttpClientFactory httpClientFactory, ILogger<NotificationService> logger, IConfiguration configuration)
|
||||||
{
|
{
|
||||||
_httpClientFactory = httpClientFactory;
|
_httpClientFactory = httpClientFactory;
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_configuration = configuration;
|
_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)
|
public async Task SendNotificationAsync(string? token, bool error, string message)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(token))
|
if (string.IsNullOrEmpty(token))
|
||||||
|
|
@ -49,7 +42,7 @@ public class NotificationService
|
||||||
var json = JsonConvert.SerializeObject(payload);
|
var json = JsonConvert.SerializeObject(payload);
|
||||||
var content = new StringContent(json, Encoding.UTF8, "application/json");
|
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)
|
if (!response.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ var builder = WebApplication.CreateBuilder(args);
|
||||||
PrepareSchemaIfNecessary = true,
|
PrepareSchemaIfNecessary = true,
|
||||||
DashboardJobListLimit = 50000,
|
DashboardJobListLimit = 50000,
|
||||||
TransactionTimeout = TimeSpan.FromMinutes(1),
|
TransactionTimeout = TimeSpan.FromMinutes(1),
|
||||||
TablesPrefix = "Hangfire_Placement"
|
TablesPrefix = "Hangfire"
|
||||||
})));
|
})));
|
||||||
builder.Services.AddHangfireServer();
|
builder.Services.AddHangfireServer();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ var builder = WebApplication.CreateBuilder(args);
|
||||||
DashboardJobListLimit = 50000,
|
DashboardJobListLimit = 50000,
|
||||||
TransactionTimeout = TimeSpan.FromMinutes(1),
|
TransactionTimeout = TimeSpan.FromMinutes(1),
|
||||||
InvisibilityTimeout = TimeSpan.FromHours(3),
|
InvisibilityTimeout = TimeSpan.FromHours(3),
|
||||||
TablesPrefix = "Hangfire_Retirement"
|
TablesPrefix = "Hangfire"
|
||||||
})));
|
})));
|
||||||
builder.Services.AddHealthChecks();
|
builder.Services.AddHealthChecks();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue