Hangfire.Pro - Enqueing a job then starting a batch


I have the need to start a background job which pulls rows from the database then spawns a new batch job which processes these rows.

When running this I encounter the following error when trying to create the new batch. Any help would be appreciated.



Hangfire.CreateBatchFailedException: An exception occurred while creating the batch. See the inner exception for details. (Hangfire job error) —> System.InvalidOperationException: The transaction associated with the current connection has completed but has not been disposed. The transaction must be disposed before the connection can be used to execute SQL statements.
at Hangfire.BatchJobClient.Create(System.Action1[Hangfire.IBackgroundJobClient], Hangfire.Batches.States.IBatchState, System.String) in C:\projects\hangfire-pro\src\Hangfire.Pro\BatchJobClient.cs:line 73 at Hangfire.BatchJobClientExtensions.StartNew(Hangfire.IBatchJobClient, System.Action1[Hangfire.IBackgroundJobClient], System.String) in C:\projects\hangfire-pro\src\Hangfire.Pro\BatchJobClientExtensions.cs:line 27
at Hangfire.BatchJob.StartNew(System.Action`1[Hangfire.IBackgroundJobClient], System.String) in C:\projects\hangfire-pro\src\Hangfire.Pro\BatchJob.cs:line 40

I’m getting the same issue with v1.6.14 – Did you find a solution, Luke?