Skip to content

Commit

Permalink
Update packages, use sliding invisibility timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
stanriders committed Jul 1, 2024
1 parent 7d74290 commit 03938a2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions backend/Mutualify/Jobs/UserRelationsUpdateJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ public async Task Run(PerformContext context, CancellationToken token)
{
var jobId = context.BackgroundJob.Id;

using var _ = _logger.BeginScope("[UserRelationsUpdateJob - {JobId}]", jobId);
using var _ = _logger.BeginScope("UserRelationsUpdateJob");

_logger.LogInformation("[{JobId}] Starting user relations update job...", jobId);

if (_isRunning && _lastStartDate.AddDays(1.5) > DateTime.Now)
if (_isRunning && _lastStartDate.AddDays(1) > DateTime.Now)
{
_logger.LogInformation("[{JobId}] User relations job is already running, abort!", jobId);
return;
Expand Down
4 changes: 2 additions & 2 deletions backend/Mutualify/Jobs/UserUpdateJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ public async Task Run(PerformContext context, CancellationToken token)
{
var jobId = context.BackgroundJob.Id;

using var _ = _logger.BeginScope("[UserUpdateJob - {JobId}]", jobId);
using var _ = _logger.BeginScope("UserUpdateJob");

_logger.LogInformation("[{JobId}] Starting user update job...", jobId);

if (_isRunning && _lastStartDate.AddDays(1.5) > DateTime.Now)
if (_isRunning && _lastStartDate.AddDays(1) > DateTime.Now)
{
_logger.LogInformation("[{JobId}] Job is already running, abort!", jobId);
return;
Expand Down
22 changes: 11 additions & 11 deletions backend/Mutualify/Mutualify.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@

<ItemGroup>
<PackageReference Include="FastExpressionCompiler" Version="4.2.0" />
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.12" />
<PackageReference Include="Hangfire.PostgreSql" Version="1.20.8" />
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.14" />
<PackageReference Include="Hangfire.PostgreSql" Version="1.20.9" />
<PackageReference Include="Mapster" Version="7.4.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.4">
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.20.1" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.2" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.4" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
<PackageReference Include="Serilog.Enrichers.ClientInfo" Version="2.0.3" />
<PackageReference Include="Serilog.Sinks.Seq" Version="7.0.1" />
<PackageReference Include="SerilogTracing.Instrumentation.AspNetCore" Version="1.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Newtonsoft" Version="6.5.0" />
<PackageReference Include="UAParser.Core" Version="4.0.3" />
<PackageReference Include="Serilog.Sinks.Seq" Version="8.0.0" />
<PackageReference Include="SerilogTracing.Instrumentation.AspNetCore" Version="2.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
<PackageReference Include="Swashbuckle.AspNetCore.Newtonsoft" Version="6.6.2" />
<PackageReference Include="UAParser.Core" Version="4.0.4" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion backend/Mutualify/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ static Task UnauthorizedRedirect(RedirectContext<CookieAuthenticationOptions> co
.UsePostgreSqlStorage(options =>
{
options.UseConnectionFactory(new NpgsqlConnectionFactory(connectionString.ConnectionString,
new PostgreSqlStorageOptions { InvisibilityTimeout = TimeSpan.FromDays(1) }));
new PostgreSqlStorageOptions { UseSlidingInvisibilityTimeout = true }));
});
});

Expand Down

0 comments on commit 03938a2

Please sign in to comment.