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.
1[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