Skip to content

Commit

Permalink
temporarily removed hangfire/azure service bus integration based on f…
Browse files Browse the repository at this point in the history
  • Loading branch information
y.moradi committed Feb 22, 2020
1 parent 6f0905d commit 220835e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 14 deletions.
2 changes: 0 additions & 2 deletions src/Server/Bit.Core/Models/AppEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ public class IdentityServer
public class Hangfire
{
public static readonly string JobSchedulerDbConnectionString = nameof(JobSchedulerDbConnectionString);

public static readonly string JobSchedulerAzureServiceBusConnectionString = nameof(JobSchedulerAzureServiceBusConnectionString);
}
}

Expand Down
6 changes: 2 additions & 4 deletions src/Server/Bit.Hangfire/Bit.Hangfire.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Hangfire.AspNetCore" Version="1.7.7" Condition=" '$(TargetFramework)' == 'netcoreapp3.1' " />
<PackageReference Include="Hangfire.AspNetCore" Version="1.7.9" />
<PackageReference Include="Hangfire.AspNetCore" Version="1.7.9" Condition=" '$(TargetFramework)' == 'netcoreapp3.1' " />
<PackageReference Include="Hangfire.Core" Version="1.7.9" />
<PackageReference Include="Hangfire.Autofac" Version="2.3.1" />
<PackageReference Include="HangFire.Azure.ServiceBusQueue" Version="4.1.0" />
<PackageReference Include="Hangfire.MemoryStorage" Version="1.6.3" />
<PackageReference Include="HangFire.Redis.StackExchange" Version="1.8.1" />
<PackageReference Include="Hangfire.SqlServer" Version="1.7.9" />
Expand All @@ -27,4 +25,4 @@
<ProjectReference Include="..\Bit.Owin\Bit.Owin.csproj" />
</ItemGroup>

</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
using Bit.Core.Models;
using Hangfire.Azure.ServiceBusQueue;
using Hangfire.SqlServer;
using System;

namespace Bit.Hangfire.Implementations
{
public class JobSchedulerSqlAndAzureServiceBusBackendConfiguration : JobSchedulerBaseBackendConfiguration<SqlServerStorage>
public class JobSchedulerSqlBackendConfiguration : JobSchedulerBaseBackendConfiguration<SqlServerStorage>
{
public virtual AppEnvironment AppEnvironment { get; set; }

Expand All @@ -25,11 +24,6 @@ protected override SqlServerStorage BuildStorage()
DisableGlobalLocks = true
}); // https://docs.hangfire.io/en/latest/configuration/using-sql-server.html#configuration

if (AppEnvironment.TryGetConfig(AppEnvironment.KeyValues.Hangfire.JobSchedulerAzureServiceBusConnectionString, out string signalRAzureServiceBusConnectionString))
{
storage.UseServiceBusQueues(signalRAzureServiceBusConnectionString);
}

return storage;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ void TryReadConnectionString(string key)
if (hangfire != null)
{
TryReadConfig<string>(hangfire, AppEnvironment.KeyValues.Hangfire.JobSchedulerDbConnectionString);
TryReadConfig<string>(hangfire, AppEnvironment.KeyValues.Hangfire.JobSchedulerAzureServiceBusConnectionString);
}

TryReadConnectionString(AppEnvironment.KeyValues.Signalr.SignalRSqlServerConnectionString);
Expand Down

0 comments on commit 220835e

Please sign in to comment.