public override string Execute() { Console.WriteLine($"Trying to queue default job in project {Project}..."); string message; var project = _projectService.GetProjectByName(Project).Result; if (project != null) { var queue = _jobQueueService.CreateDefaultJobQueue(project.Id, new NewJobDto { ProjectId = project.Id, OriginUrl = Dns.GetHostEntry(Dns.GetHostName()).AddressList.Last(a => a.AddressFamily == AddressFamily.InterNetwork).ToString() }).Result; message = queue.ToCliString($"Default job \"{queue.JobDefinitionName}\" has been queued successfully:", excludedFields: new string[] { "ProjectId", "JobDefinitionId", "JobTasksStatus", "OutputValues", "CatapultEngineId", "CatapultEngineMachineName", "CatapultEngineIPAddress", "CatapultEngineVersion" }); Logger.LogInformation(message); message += "\nThe job will be picked up by a running engine shortly."; return(message); } message = $"Project {Project} was not found"; return(message); }