Exemplo n.º 1
0
        public static TriggeredJobRunLogger LogNewRun(TriggeredJob triggeredJob, IEnvironment environment, IFileSystem fileSystem, ITraceFactory traceFactory, IDeploymentSettingsManager settings)
        {
            OldRunsCleanup(triggeredJob.Name, fileSystem, environment, traceFactory, settings);

            string id = DateTime.UtcNow.ToString("yyyyMMddHHmmssffff");
            var logger = new TriggeredJobRunLogger(triggeredJob.Name, id, environment, fileSystem, traceFactory);
            var triggeredJobStatus = new TriggeredJobStatus()
            {
                Status = "Initializing",
                StartTime = DateTime.UtcNow
            };
            logger.ReportStatus(triggeredJobStatus);
            return logger;
        }
Exemplo n.º 2
0
        public static TriggeredJobRunLogger LogNewRun(TriggeredJob triggeredJob, IEnvironment environment, ITraceFactory traceFactory, IDeploymentSettingsManager settings)
        {
            OldRunsCleanup(triggeredJob.Name, environment, traceFactory, settings);

            string id                 = DateTime.UtcNow.ToString("yyyyMMddHHmmssffff");
            var    logger             = new TriggeredJobRunLogger(triggeredJob.Name, id, environment, traceFactory);
            var    triggeredJobStatus = new TriggeredJobStatus
            {
                Status    = JobStatus.Initializing,
                StartTime = DateTime.UtcNow
            };

            logger.ReportStatus(triggeredJobStatus);
            return(logger);
        }