Primera versión estable compatible con linux de WSAsegasa
This commit is contained in:
46
WSAsegasa/Procesos.cs
Normal file
46
WSAsegasa/Procesos.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WSAsegasa;
|
||||
|
||||
|
||||
namespace WSAsegasa
|
||||
{
|
||||
public class Procesos
|
||||
{
|
||||
public static Configuracion Conf;
|
||||
|
||||
public static DateTime? HoraUtcUltimaEjecucionProcesos = null;
|
||||
private static bool Procesando;
|
||||
|
||||
public static void Procesar()
|
||||
{
|
||||
if (!Procesando && (HoraUtcUltimaEjecucionProcesos.HasValue == false || DateTime.UtcNow.Subtract(HoraUtcUltimaEjecucionProcesos.Value).TotalSeconds > Conf.SegundosMinimosEntreProcesos)) ;
|
||||
{
|
||||
Procesando = true;
|
||||
HoraUtcUltimaEjecucionProcesos = DateTime.UtcNow;
|
||||
try
|
||||
{
|
||||
// ProcesosCorreos.EnviaCorreos();
|
||||
// Comprobaciones.CompruebaReplica();
|
||||
// Comprobaciones.ChequeaColaCorreo();
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Debug.WriteLine(@"Procesar: EXCEPCIÓN: " + ex.Message + " " + ex.StackTrace);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Procesando = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user