public bfgWorker(string name, string route, string[] tags, IAppServiceRegistry registry, IAppServiceDiscovery services, IZipService zipService, IAppStatusServiceClient appStatus, IRxnManager <IRxn> rxnManager, IUpdateServiceClient updateService, IAppStatusCfg cfg, Func <ITestArena[]> arena) { _registry = registry; _services = services; _zipService = zipService; _appStatus = appStatus; _rxnManager = rxnManager; _updateService = updateService; _cfg = cfg; _arena = arena; Name = name; Route = route; Info.Add(bfgTagWorkflow.WorkerTag, tags.ToStringEach()); }
public static string ClientId = bfgCfg.Detect().Id.Split('-').FirstOrDefault(); //get from cfg file if exists public bfgWorkerManager(bfgCluster workerCluster, IObservable <StartUnitTest[]> cfg, SystemStatusPublisher systemStatus, IResolveTypes resolver, IRxnManager <IRxn> eventManager, IAppStatusCfg appStatusCfg, IAppServiceRegistry appServiceRegistry, IZipService zipService, IAppStatusStore appCmds, IAppStatusServiceClient appStatus, IAppServiceDiscovery serviceDiscovery, IUpdateServiceClient appUpdates) { _workerCluster = workerCluster; _cfg = cfg; _resolver = resolver; _eventManager = eventManager; _appStatusCfg = appStatusCfg; _appServiceRegistry = appServiceRegistry; _zipService = zipService; _appCmds = appCmds; _appStatus = appStatus; _serviceDiscovery = serviceDiscovery; _appUpdates = appUpdates; systemStatus.Process(new AppStatusInfoProviderEvent() { ReporterName = nameof(bfgWorkerManager), Component = "Status", Info = WorkerManagerStatus }).Until(); }
public bfgFileSystemTapeRepository(IFileSystemService fileSystem, IAppStatusCfg cfg, IStringCodec codec) { _defaultCodec = codec; _fileSystem = fileSystem; _cfg = cfg; }
public static IObservable <string> LaunchAppToTestArenaIf(string appName, string appVersion, string appDll, string testArenaAddress, IAppStatusCfg cfg) { if (HasNotChangedSinceLastUpload(appName, appVersion)) { return(appVersion.ToObservable()); } return(RxnApps.CreateAppUpdate( appName, Scrub(appVersion), new FileInfo(appDll).DirectoryName, false, cfg, testArenaAddress, new string[] { DataDir } ) .Catch <Unit, Exception>( e => { ReportStatus.Log.OnError("Could not upload test. Cant join cluster :(", e); throw e; }) .Select(_ => appVersion)); }
/// <summary> /// todo: fix this method, it should use a delay, thats a hack! /// </summary> /// <param name="unitTestToRun"></param> /// <param name="testArenaAddress"></param> /// <param name="cfg"></param> /// <returns></returns> public static IObservable <string> LaunchUnitTestsToTestArenaDelayed(IObservable <StartUnitTest[]> unitTestToRun, string testArenaAddress, IAppStatusCfg cfg) { return(unitTestToRun.Delay(TimeSpan.FromSeconds(1.5)) .SelectMany(t => t) .SelectMany(runTheseUnitTest => LaunchAppToTestArenaIf(runTheseUnitTest.UseAppUpdate, runTheseUnitTest.UseAppVersion, runTheseUnitTest.Dll, testArenaAddress, cfg)) ); }