1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 15:42:48 -05:00

Remove unused job hosted service from billing (#3831)

This commit is contained in:
Oscar Hinton
2024-02-20 18:50:04 +01:00
committed by GitHub
parent af56ab4159
commit 80a3979be1
2 changed files with 0 additions and 48 deletions

View File

@ -1,44 +0,0 @@
using System.Runtime.InteropServices;
using Bit.Core.Jobs;
using Bit.Core.Settings;
using Quartz;
namespace Bit.Billing.Jobs;
public class JobsHostedService : BaseJobsHostedService
{
public JobsHostedService(
GlobalSettings globalSettings,
IServiceProvider serviceProvider,
ILogger<JobsHostedService> logger,
ILogger<JobListener> listenerLogger)
: base(globalSettings, serviceProvider, logger, listenerLogger) { }
public override async Task StartAsync(CancellationToken cancellationToken)
{
var timeZone = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ?
TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time") :
TimeZoneInfo.FindSystemTimeZoneById("America/New_York");
if (_globalSettings.SelfHosted)
{
timeZone = TimeZoneInfo.Local;
}
var everyDayAtNinePmTrigger = TriggerBuilder.Create()
.WithIdentity("EveryDayAtNinePmTrigger")
.StartNow()
.WithCronSchedule("0 0 21 * * ?", x => x.InTimeZone(timeZone))
.Build();
Jobs = new List<Tuple<Type, ITrigger>>();
// Add jobs here
await base.StartAsync(cancellationToken);
}
public static void AddJobsServices(IServiceCollection services)
{
// Register jobs here
}
}

View File

@ -76,10 +76,6 @@ public class Startup
// Authentication
services.AddAuthentication();
// Jobs service, uncomment when we have some jobs to run
// Jobs.JobsHostedService.AddJobsServices(services);
// services.AddHostedService<Jobs.JobsHostedService>();
// Set up HttpClients
services.AddHttpClient("FreshdeskApi");