Comments (3)
The problem code is in Dequeue method:
_storage.UseConnection(connection =>
{
fetchedJob = connection.Query<FetchedJob>(
fetchNextJobSqlTemplate,
new { queues = queues, fetchedAt = DateTime.UtcNow })
.SingleOrDefault();
if (fetchedJob == null)
{
cancellationToken.WaitHandle.WaitOne(_options.QueuePollInterval);
cancellationToken.ThrowIfCancellationRequested();
}
else
{
// update
connection.Execute(dequeueJobSqlTemplate,
new { id = fetchedJob.Id, fetchedAt = DateTime.UtcNow });
}
}, true);
Correct lock handling:
_storage.UseConnection(connection =>
{
fetchedJob = connection.Query<FetchedJob>(
fetchNextJobSqlTemplate,
new { queues = queues, fetchedAt = DateTime.UtcNow })
.SingleOrDefault();
}, true);
if (fetchedJob == null)
{
cancellationToken.WaitHandle.WaitOne(_options.QueuePollInterval);
cancellationToken.ThrowIfCancellationRequested();
}
else
{
_storage.UseConnection(connection =>
{
// update
connection.Execute(dequeueJobSqlTemplate,
new { id = fetchedJob.Id, fetchedAt = DateTime.UtcNow });
}, true);
}
from hangfireextension.
Version 1.2.0 is now available,please update nuget reference to retry
from hangfireextension.
It's fixed. Thanks!
from hangfireextension.
Related Issues (20)
- 能不能把 dapper 的依赖去掉呢 仅仅依赖sqlite自身的库 HOT 1
- Updated NuGet Publication HOT 4
- support .net core? HOT 9
- Records in JobParameter and State table are not deleted when expired HOT 2
- Sqlite storage makes asp.net core application very slow HOT 1
- If a Job fails 3 times in a row, it will never run to completion
- Hangfire Dashboard: Cannot implicitly convert type ‘long’ to ‘int?’. An explicit conversion exists (are you missing a cast?) HOT 1
- Database is locked error HOT 2
- ConnectionString detection is not very robust HOT 1
- You need to call SQLitePCL.raw.SetProvider() HOT 2
- Problem with connection string without semicolon HOT 1
- It should be documented that the connection string must include DateTimeFormat=Ticks HOT 2
- Make given string is valid connection string by the property like "data source" or using System.Data.Common.DbConnectionStringBuilder class instead of checking the string has ';'. HOT 1
- Duplicate key error when navigate to job details HOT 1
- Hi Wu, about to update hangfire extension HOT 3
- Maintenance needed HOT 11
- Encrypted support in .Net Standard 2.0 with .Net Framework 4.8
- There is any configuration way to decrease HangFire sqlitedb file after specific size or specific time
- How Can we configure Auto Clean up for sqlitedb after specific time?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hangfireextension.