This project has moved and is read-only. For the latest updates, please go here.

DefaultJobExecutor job status update problem case



recently I came across such a scenario.

A job finished successfully but the db status couldn't update from Done = 16 status to Scheduled = 4 because of a temporary db problem.

So this job's status stuck to Done and never schedules again.

What can be done about this?

2014-02-28 19:19:14.4245 | BackgroundWorkerService.Logic.Implementation.JobManager | Could not set job to ready for next scheduled execution. | System.Data.SqlClient.SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Linq.SqlClient.SqlConnectionManager.UseConnection(IConnectionUser user)
at System.Data.Linq.SqlClient.SqlProvider.get_IsSqlCe()
at System.Data.Linq.SqlClient.SqlProvider.InitializeProviderMode()
at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
at System.Data.Linq.DataContext.ExecuteQuery[TResult](String query, Object[] parameters)
at BackgroundWorkerService.Logic.Implementation.JobStore.Linq2Sql.Linq2SqlJobStore.UpdateJob(JobData job)
at BackgroundWorkerService.Logic.Implementation.Internal.DefaultJobExecutor.ExecuteJob(JobContext jobContext)


dawidpotgieter wrote Feb 12, 2015 at 10:50 PM

There is no built in capability to handle this type of case I'm afraid. Best solution would be to implement a retry policy in the Linq2SqlJobStore (or your own), but there are no plans to handle this edge case atm.