Skip to content

Commit

Permalink
Update SqlServerJobQueue.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
odinserj committed Nov 26, 2024
1 parent bc48bae commit d2bf417
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Hangfire.SqlServer/SqlServerJobQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void Enqueue(DbConnection connection, DbTransaction transaction, string q
var query = _storage.GetQueryFromTemplate(static schemaName =>
$@"insert into [{schemaName}].JobQueue (JobId, Queue) values (@jobId, @queue)");

var command = ((DbConnection)connection).Create(query, timeout: _storage.CommandTimeout);
using var command = ((DbConnection)connection).Create(query, timeout: _storage.CommandTimeout);
command.AddParameter("@jobId", long.Parse(jobId, CultureInfo.InvariantCulture), DbType.Int64);
command.AddParameter("@queue", queue, DbType.String);

Expand Down

0 comments on commit d2bf417

Please sign in to comment.