From 8c948c13d10518e9e782df703983fd5bb3916921 Mon Sep 17 00:00:00 2001 From: Sergey Odinokov Date: Tue, 23 Apr 2024 16:42:41 +0700 Subject: [PATCH] Bump Hangfire.Core to 1.8.12 --- samples/ConsoleSample/ConsoleSample.csproj | 4 ++-- samples/ConsoleSample/HarnessHostedService.cs | 14 ++++--------- samples/ConsoleSample/packages.lock.json | 20 +++++++++---------- 3 files changed, 16 insertions(+), 22 deletions(-) diff --git a/samples/ConsoleSample/ConsoleSample.csproj b/samples/ConsoleSample/ConsoleSample.csproj index 8c2ec0d..48b22c6 100644 --- a/samples/ConsoleSample/ConsoleSample.csproj +++ b/samples/ConsoleSample/ConsoleSample.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/samples/ConsoleSample/HarnessHostedService.cs b/samples/ConsoleSample/HarnessHostedService.cs index 0b58727..6cc65a2 100644 --- a/samples/ConsoleSample/HarnessHostedService.cs +++ b/samples/ConsoleSample/HarnessHostedService.cs @@ -23,23 +23,17 @@ protected override Task ExecuteAsync(CancellationToken stoppingToken) { var sw = Stopwatch.StartNew(); - Parallel.For(0, 250_000, new ParallelOptions { MaxDegreeOfParallelism = Environment.ProcessorCount }, i => + Parallel.For(0, 25_000, new ParallelOptions { MaxDegreeOfParallelism = Environment.ProcessorCount }, i => { - _backgroundJobs.Enqueue(() => EmptyDefault()); - _backgroundJobs.Enqueue(() => EmptyCritical()); + _backgroundJobs.Enqueue("default" ,() => Empty()); + _backgroundJobs.Enqueue("critical", () => Empty()); }); _logger.LogInformation($"Enqueued in {sw.Elapsed}"); return Task.CompletedTask; } - [Queue("default")] - public static void EmptyDefault() - { - } - - [Queue("critical")] - public static void EmptyCritical() + public static void Empty() { } } diff --git a/samples/ConsoleSample/packages.lock.json b/samples/ConsoleSample/packages.lock.json index 260498b..c407bcc 100644 --- a/samples/ConsoleSample/packages.lock.json +++ b/samples/ConsoleSample/packages.lock.json @@ -4,28 +4,28 @@ "net6.0": { "Hangfire.AspNetCore": { "type": "Direct", - "requested": "[1.8.0, )", - "resolved": "1.8.0", - "contentHash": "WlXDWCC0BxqihYOvRhOjO1/YMP7CpZmvPfwj4DfRrd/MOOwwo9BApFXxm8Wfj8OwbirGR8sMBFHkrEOY5/DC2Q==", + "requested": "[1.8.12, )", + "resolved": "1.8.12", + "contentHash": "H/+JePER6FTW/TcTvfEKRGVaRvY38pQHBB9xKGeKMUEOyMbm9tN5gMvT0ifFPCPj6cv1GMejvds7JVMqY01y9Q==", "dependencies": { - "Hangfire.NetCore": "[1.8.0]" + "Hangfire.NetCore": "[1.8.12]" } }, "Hangfire.Core": { "type": "Direct", - "requested": "[1.8.0, )", - "resolved": "1.8.0", - "contentHash": "YyQwi1iKCS4HsKnwUhY5dcyxOeJ0MqA/0gjeTJdMsCXufKl73I+y8mS5MbvQBIKMGcjv0FYzjLA+v31P6G+CRw==", + "requested": "[1.8.12, )", + "resolved": "1.8.12", + "contentHash": "EP2JbfDiOAo6Jo3VmQAbRm7Cq6tcldiI2V/xYYjilIGutWuhgxM7aP+uJW6sE5LAnrLL54ahYfBISJLdE1VimQ==", "dependencies": { "Newtonsoft.Json": "11.0.1" } }, "Hangfire.NetCore": { "type": "Transitive", - "resolved": "1.8.0", - "contentHash": "F5hcmN8dNA+pXsOwZi/x+WFhcZPa6MICpmecbnLEyq92MUiHLfof5/dE6P0yJQg31awOSm6VRv8HgvHhUncqPA==", + "resolved": "1.8.12", + "contentHash": "SqkGar5IgfuoASoSZR1sggHy0Adagbgrf4h4HCkcRB3GTWgbAzRde4rBXOwUaLOlMgCsufALUN4BtE711EFzPQ==", "dependencies": { - "Hangfire.Core": "[1.8.0]", + "Hangfire.Core": "[1.8.12]", "Microsoft.Extensions.DependencyInjection.Abstractions": "3.0.0", "Microsoft.Extensions.Hosting.Abstractions": "3.0.0", "Microsoft.Extensions.Logging.Abstractions": "3.0.0"