protected override void AdjustCommand(ReleaseOptions opts, CommandLineActivity activity) { base.AdjustCommand(opts, activity); var useCase = new ReleaseUseCase(); var compatible = useCase.FilterCompatiblePipelines(BasicActivator.RepositoryLocator.CatalogueRepository.GetAllObjects <Pipeline>()).ToArray(); if (!compatible.Any()) { throw new Exception("No compatible pipelines"); } var pipe = BasicActivator.SelectOne("Release Pipeline", compatible, null, true); if (pipe == null) { throw new OperationCanceledException(); } opts.Pipeline = pipe.ID; opts.Configurations = configs.Select(c => c.ID).ToArray(); opts.ReleaseGlobals = true; // all datasets opts.SelectedDataSets = null; }
private RDMPCommandLineOptions CommandGetter(CommandLineActivity commandLineActivity) { return(new DqeOptions() { Catalogue = _catalogue.ID, Command = commandLineActivity }); }
private RDMPCommandLineOptions CommandGetter(CommandLineActivity commandLineActivity) { return(new CacheOptions() { CacheProgress = _cacheProgress.ID, Command = commandLineActivity, RetryMode = cbFailures.Checked }); }
private RDMPCommandLineOptions CommandGetter(CommandLineActivity activityRequested) { return(new ReleaseOptions() { Pipeline = _pipelineSelectionUI1.Pipeline == null ? 0 : _pipelineSelectionUI1.Pipeline.ID, Configurations = _configurations.Where(c => tlvReleasePotentials.IsChecked(c) || tlvReleasePotentials.IsCheckedIndeterminate(c)).Select(ec => ec.ID).ToArray(), SelectedDataSets = _selectedDataSets.All(tlvReleasePotentials.IsChecked)?new int[0]: tlvReleasePotentials.CheckedObjects.OfType <ISelectedDataSets>().Select(sds => sds.ID).ToArray(), Command = activityRequested, ReleaseGlobals = tlvReleasePotentials.IsChecked(_globalsNode), }); }
private RDMPCommandLineOptions CommandGetter(CommandLineActivity activityRequested) { int max; //if user has defined an alternative maximum concurrent number of executing extraction threads max = int.TryParse(tbMaxConcurrent.Text, out max) ? max : 3; return(new ExtractionOptions() { Command = activityRequested, ExtractGlobals = tlvDatasets.IsChecked(_globalsFolder), MaxConcurrentExtractions = max, ExtractionConfiguration = _extractionConfiguration.ID, Pipeline = _pipelineSelectionUI1.Pipeline == null? 0 : _pipelineSelectionUI1.Pipeline.ID, Datasets = _datasets.All(tlvDatasets.IsChecked) ? new int[0] : _datasets.Where(tlvDatasets.IsChecked).Select(sds => sds.ExtractableDataSet.ID).ToArray() }); }
protected override void AdjustCommand(ExtractionOptions opts, CommandLineActivity activity) { base.AdjustCommand(opts, activity); var useCase = ExtractionPipelineUseCase.DesignTime(); var compatible = useCase.FilterCompatiblePipelines(BasicActivator.RepositoryLocator.CatalogueRepository.GetAllObjects <Pipeline>()).ToArray(); if (!compatible.Any()) { throw new Exception("No compatible pipelines"); } var pipe = BasicActivator.SelectOne("Extraction Pipeline", compatible, null, true); if (pipe == null) { throw new OperationCanceledException(); } opts.Pipeline = pipe.ID; }
private RDMPCommandLineOptions AutomationCommandGetter(CommandLineActivity activityRequested) { var lp = GetLoadProgressIfAny(); var debugOpts = (DebugOptions)dd_DebugOptions.SelectedItem; var options = new DleOptions { Command = activityRequested, LoadMetadata = _loadMetadata.ID, Iterative = cbRunIteratively.Checked, DaysToLoad = Convert.ToInt32(udDaysPerJob.Value), DoNotArchiveData = debugOpts != DebugOptions.RunNormally, StopAfterRAW = debugOpts == DebugOptions.StopAfterRAW, StopAfterSTAGING = debugOpts == DebugOptions.StopAfterRAW || debugOpts == DebugOptions.StopAfterSTAGING, }; if (lp != null) { options.LoadProgress = lp.ID; } return(options); }
protected override void AdjustCommand(DleOptions opts, CommandLineActivity activity) { base.AdjustCommand(opts, activity); if (lmd.LoadProgresses.Any() && activity == CommandLineActivity.run) { var lp = (LoadProgress)BasicActivator.SelectOne("Load Progres", lmd.LoadProgresses, null, true); if (lp == null) { return; } opts.LoadProgress = lp.ID; if (BasicActivator.SelectValueType("Days to Load", typeof(int), lp.DefaultNumberOfDaysToLoadEachTime, out object chosen)) { opts.DaysToLoad = (int)chosen; } else { return; } } }
/// <summary> /// Override in subclasses to get last minute choices e.g. what pipeline to use for an extraction /// </summary> /// <param name="opts"></param> protected virtual void AdjustCommand(T opts, CommandLineActivity activity) { }