public void Execute(IJobExecutionContext context) { string url = context.JobDetail.Key.Name; try { Log.Verbose($"Installing frapid on domain {url}."); string database = DbConvention.GetTenant(url); Log.Verbose($"Creating database {database}."); var db = new DbInstaller(database); db.Install(); Log.Verbose("Getting installables."); var installables = GetInstallables(database); Log.Information($"The following apps will be installed:\n\n {installables}."); foreach (var installable in installables) { Log.Verbose($"Installing module {installable.ApplicationName}."); new AppInstaller(database, installable).Install(); } var tenant = new DomainSerializer("DomainsApproved.json").Get().FirstOrDefault(x => x.DomainName.Equals(url)); DbInstalledDomains.Add(tenant); } catch (Exception ex) { Log.Error("Could not install frapid on {url} due to errors. Exception: {Exception}", url, ex); throw; } }
public void Execute(IJobExecutionContext context) { string url = context.JobDetail.Key.Name; string catalog = DbConvention.GetCatalog(url); var db = new DbInstaller(catalog); db.Install(); var installables = GetInstallables(); foreach (var installable in installables) { new AppInstaller(catalog, installable).Install(); } }
public void Execute(IJobExecutionContext context) { string url = context.JobDetail.Key.Name; try { string catalog = DbConvention.GetCatalog(url); var db = new DbInstaller(catalog); db.Install(); var installables = GetInstallables(); foreach (var installable in installables) { new AppInstaller(catalog, installable).Install(); } } catch (Exception ex) { Log.Error("Could not install frapid on {url} due to errors. Exception: {Exception}", url, ex); throw; } }