Example #1
0
 public TestJobKilling(
     IHostApplicationLifetime appLifetime,
     IJobFacServiceProvider jobFacServices)
     : base(appLifetime)
 {
     this.jobFacServices = jobFacServices;
 }
Example #2
0
 public ProcessMonitor(
     IHostApplicationLifetime appLifetime,
     ILogger <ProcessMonitor> logger,
     IJobFacServiceProvider jobFacServices)
     : base(appLifetime)
 {
     this.logger         = logger;
     this.jobFacServices = jobFacServices;
 }
Example #3
0
 public JobFacAwareProcessContext(
     IHostApplicationLifetime hostApplicationLifetime,
     string instanceId, string[] args, string payload,
     IJobExternalProcess jobService,
     IJobFacServiceProvider provider)
 {
     appLifetime        = hostApplicationLifetime;
     JobInstanceId      = instanceId;
     CommandLineArgs    = args;
     StartupPayload     = payload;
     JobService         = jobService;
     JobServiceProvider = provider;
 }
Example #4
0
        public JobFacAwareBackgroundService(
            TJobFacAwareProcess targetProcess,
            IHostApplicationLifetime hostApplicationLifetime,
            IJobFacServiceProvider jobFacServiceProvider,
            JobFacAwareProcessOptions jobFacServiceOptions)
            : base(hostApplicationLifetime)
        {
            if (jobFacServiceOptions.CommandLineArgs.Length == 0)
            {
                throw new ArgumentException("JobFac-aware apps require one GUID argument reflecting the job instance-key");
            }

            jobInstanceId = Formatting.FormattedInstanceKey(jobFacServiceOptions.CommandLineArgs[0]);
            if (!jobInstanceId.HasContent())
            {
                throw new ArgumentException("JobFac-aware apps require one GUID argument reflecting the job instance-key");
            }

            process        = targetProcess;
            jobFacProvider = jobFacServiceProvider;
            options        = jobFacServiceOptions;
        }
Example #5
0
 public ClusterClientHostedService(IJobFacServiceProvider clientWrapper)
 => orleansClusterClientWrapper = clientWrapper;