IDictionary <string, WpsProcess> LoadProcessesFromConfiguration()
        {
            IDictionary <string, WpsProcess> processes = new Dictionary <string, WpsProcess>();

            foreach (var processConfig in WebProcessingServiceConfiguration.Settings.Processes)
            {
                WpsProcess process = processConfig.CreateHandlerInstance(this.Accessor, this.Cache, this.ServiceProvider, true);
                processes.Add(process.Id, process);
            }

            return(processes);
        }
Esempio n. 2
0
 public WpsJob(WpsProcess wpsProcess, Execute execute)
 {
     logger = wpsProcess.GetLogger();
     logger.LogInformation("Create new wpsjob");
     logger.LogDebug("Create new wpsjob -- start");
     this.wpsProcess  = wpsProcess;
     this.wpsJobCache = this.wpsProcess.GetMemoryCache();
     progress         = new JobProgress();
     creationTime     = DateTime.UtcNow;
     this.jobOrder    = new JobOrder()
     {
         ExecuteRequest = execute, JobProgress = progress, CreationTime = creationTime
     };
     this.Task         = wpsProcess.CreateTask(jobOrder);
     Uid               = Save(DateTimeOffset.Now.Add(wpsProcess.JobCacheTime));
     this.jobOrder.Uid = this.Uid;
     JobOrder.WriteExecuteRequest(execute, this.Uid);
     logger.LogDebug("Create new wpsjob -- end");
 }