Cleaned up Job Queue, Gql Logs, and fixed issue for audatex Lin Files with PART_DES_J
This commit is contained in:
@@ -61,7 +61,8 @@ namespace BodyshopPartner.Utils
|
||||
break;
|
||||
}
|
||||
//Only peek at the first item in the queue so that it does not get added again while it is still getting processed.
|
||||
item = _jobs.Peek();
|
||||
// item = _jobs.Peek();
|
||||
item = _jobs.Dequeue();
|
||||
}
|
||||
|
||||
try
|
||||
@@ -74,8 +75,11 @@ namespace BodyshopPartner.Utils
|
||||
catch (Exception ex)
|
||||
{
|
||||
ThreadPool.UnsafeQueueUserWorkItem(ProcessQueuedItems, null);
|
||||
logger.Error(ex, "Error processing job queue item. ");
|
||||
//throw;
|
||||
logger.Error("Error processing job queue item. " + ex.ToString());
|
||||
}
|
||||
finally
|
||||
{
|
||||
// _jobs.Dequeue();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -146,15 +150,15 @@ namespace BodyshopPartner.Utils
|
||||
var r = new GraphQLRequest
|
||||
{
|
||||
Query = @"
|
||||
mutation INSERT_AVAILABLE_JOB($jobInput: [available_jobs_insert_input!]!) {
|
||||
insert_available_jobs(objects: $jobInput, on_conflict: {constraint: available_jobs_clm_no_bodyshopid_key, update_columns: [clm_amt, cieca_id, est_data, issupplement, ownr_name, source_system, supplement_number, vehicle_info]}) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
mutation INSERT_AVAILABLE_JOB($jobInput: [available_jobs_insert_input!]!) {
|
||||
insert_available_jobs(objects: $jobInput, on_conflict: {constraint: available_jobs_clm_no_bodyshopid_key, update_columns: [clm_amt, cieca_id, est_data, issupplement, ownr_name, source_system, supplement_number, vehicle_info]}) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
",
|
||||
",
|
||||
Variables = new
|
||||
{
|
||||
jobInput = newJob,
|
||||
@@ -194,7 +198,7 @@ mutation INSERT_AVAILABLE_JOB($jobInput: [available_jobs_insert_input!]!) {
|
||||
//}); ;
|
||||
});
|
||||
}
|
||||
_jobs.Dequeue();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user