Exemplo n.º 1
0
        public static List <string> GetReport(IHttpContextAccessor accessor, IMemoryCache cache, IServiceProvider serviceProvider, string uid)
        {
            var job = WpsJob.Load(accessor, cache, serviceProvider, uid);

            if (job == null)
            {
                throw new EntryPointNotFoundException();
            }
            return(job.GetReport());
        }
Exemplo n.º 2
0
        public static Execute GetExecuteRequest(IHttpContextAccessor accessor, IMemoryCache cache, IServiceProvider serviceProvider, string uid)
        {
            var job = WpsJob.Load(accessor, cache, serviceProvider, uid, false);

            if (job == null)
            {
                throw new EntryPointNotFoundException();
            }
            return(job.jobOrder.ExecuteRequest);
        }
Exemplo n.º 3
0
        public static ExecuteResponse GetCachedExecuteResponse(IHttpContextAccessor accessor, IMemoryCache cache, IServiceProvider serviceProvider, string uid)
        {
            var job = WpsJob.Load(accessor, cache, serviceProvider, uid);

            if (job == null)
            {
                throw new EntryPointNotFoundException();
            }
            return(job.GetExecuteResponse());
        }
Exemplo n.º 4
0
        public static void ForceRetry(IHttpContextAccessor accessor, IMemoryCache cache, IServiceProvider serviceProvider, string uid, int retry)
        {
            var job = WpsJob.Load(accessor, cache, serviceProvider, uid);

            if (job == null)
            {
                throw new EntryPointNotFoundException();
            }
            if (job.jobOrder.RecoveryInfo != null)
            {
                job.jobOrder.RecoveryInfo.retry = retry;
                job.jobOrder.SetRecoveryInfo(job.jobOrder.RecoveryInfo);
            }
            job.Run();
        }