Пример #1
0
 public static JobExecution Build(Action<JobExecutionFactoryContext> with)
 {
     return with.Apply(context =>
     {
         return new JobExecution
         {
             Identifier = context.Entry.Identifier,
             Deploy = Deploy(context),
             NextRun = NextRun(context),
             Job = context.Entry.Job,
             Progress = new JobExecutionProgress
             {
                 GetStatus = GetStatus(context),
                 OnScheduled = OnScheduled(context),
                 OnStarted = OnStarted(context),
                 OnCompleted = OnCompleted(context),
                 OnFailed = OnFailed(context),
                 GetPid = GetPid(context)
             },
             Metrics = new JobExecutionMetrics
             {
                 OnMemory = OnMemory(context),
                 OnProcessor = OnProcessor(context)
             }
         };
     });
 }
Пример #2
0
 public static BlobRepository Create(Action<BlobRepositoryFactoryContext> with)
 {
     return with.Apply(context =>
     {
         return new BlobRepository
         {
             GetById = GetById(context),
             New = New(context)
         };
     });
 }
Пример #3
0
 public static JobTaskRepository Create(Action<JobTaskRepositoryFactoryContext> with)
 {
     return with.Apply(context =>
     {
         return new JobTaskRepository
         {
             New = New(context),
             GetByJob = GetByJob(context)
         };
     });
 }
Пример #4
0
 public static JobRepository Create(Action<JobRepositoryFactoryContext> with)
 {
     return with.Apply(context =>
     {
         return new JobRepository
         {
             New = New(context),
             All = All(context),
             Single = Single(context),
             Update = Update(context)
         };
     });
 }
Пример #5
0
 public static Blob Create(Action<BlobFactoryContext> with)
 {
     return with.Apply(context =>
     {
         return new Blob
         {
             Identifier = context.Identifier,
             GetHash = GetHash(context),
             GetSize = GetSize(context),
             GetFiles = GetFiles(context),
             DeployTo = DeployTo(context)
         };
     });
 }
Пример #6
0
 public static JobTask Build(Action<JobTaskFactoryContext> with)
 {
     return with.Apply(context =>
     {
         return new JobTask
         {
             Identifier = context.Execution.Identifier,
             Start = Start(context),
             Statistics = new JobTaskStatistics
             {
                 Publish = PublishStatistics(context)
             }
         };
     });
 }