public TenantedBackgroundJobClient(TraffkGlobalDbContext gdb, ITraffkTenantFinder finder, IJobInfoFinder jobInfoFinder = null, ICurrentUser currentUser = null) { Inner = new BackgroundJobClient(); GDB = gdb; Finder = finder; CurrentUser = currentUser; RecurringJobManager = new RecurringJobManager(); TenantId = Finder.GetTenantIdAsync().ExecuteSynchronously(); JobInfoFinder = jobInfoFinder; }
public EtlJobRunner( IOptions <EtlJobRunnerConfig> configOptions, Bal.Data.Rdb.TraffkTenantModel.TraffkTenantModelDbContext ttmDb, IOptions <BlobStorageServices.Config> blobConfig, IHttpClientFactory httpClientFactory, TraffkGlobalDbContext globalContext, IJobInfoFinder jobInfoFinder, ILogger logger) : base(globalContext, jobInfoFinder, logger) { ConfigOptions = configOptions; HttpClientFactory = httpClientFactory; TtmDb = ttmDb; BlobConfigOptions = blobConfig; }
public DataSourceSyncRunner( IJobInfoFinder jobInfoFinder, IHttpClientFactory httpClientFactory, JobRunnerProgram jobRunnerProgram, TraffkGlobalDbContext gdb, Bal.Data.Rdb.TraffkTenantShards.TraffkTenantShardsDbContext tdb, IVault vault, IOptions <BlobStorageServices.Config> blobConfig, Serilog.ILogger logger) : base(gdb, jobInfoFinder, logger) { HttpClientFactory = httpClientFactory; BlobConfig = blobConfig; Vault = vault; TenantName = tdb.TenantFindByTenantId(jobInfoFinder.JobInfo.TenantId.Value).Result.First().TenantName; }
protected BaseJobRunner( TraffkGlobalDbContext globalContext, IJobInfoFinder jobInfoFinder, ILogger logger) { GlobalContext = globalContext; InstanceId = Interlocked.Increment(ref InstanceId_s); JobInfo = jobInfoFinder.JobInfo; Logger = logger.ForContext(new ILogEventEnricher[] { new PropertyEnricher(nameof(InstanceId), InstanceId), new PropertyEnricher(nameof(JobInfo.JobId), JobInfo?.JobId), new PropertyEnricher(typeof(Type).Name, GetType().Name), }); Logger.Information(ConstructedText); }
public TenantedJobRunner( TraffkTenantModelDbContext db, TraffkGlobalDbContext globalContext, IJobInfoFinder jobInfoFinder, CurrentTenantServices current, ITableauAdminService tableauAdminService, ILogger logger, ITableauVisualServices tableauVisualService, BlobStorageServices blobStorageService, IBackgroundJobClient innerBackgroundJobClient) : base(globalContext, jobInfoFinder, logger) { DB = db; Current = current; TableauAdminService = tableauAdminService; TableauVisualService = tableauVisualService; BlobStorageService = blobStorageService; InnerBackgroundJobClient = innerBackgroundJobClient; }
public TenantManagementJobsRunner( IJobInfoFinder jobInfoFinder, TraffkGlobalDbContext gdb, Serilog.ILogger logger, TraffkTenantShardsDbContext tdb, TraffkTenantShardManagerDbContext smdb, IPasswordHasher <ApplicationUser> passwordHasher, ServiceClientCredentialFactory credentialFactory, IOptions <Config> configOptions, DbContextOptions <TraffkTenantModelDbContext> rdbOptions) : base(gdb, jobInfoFinder, logger) { CredentialFactory = credentialFactory; ConfigOptions = configOptions; RdbOptions = rdbOptions; Smdb = smdb; Tdb = tdb; PasswordHasher = passwordHasher; }