Cleaned up Job Queue, Gql Logs, and fixed issue for audatex Lin Files with PART_DES_J

This commit is contained in:
Patrick Fic
2020-12-03 16:59:10 -08:00
parent 53372cce9f
commit 3324f4c3b4
7 changed files with 74 additions and 46 deletions

View File

@@ -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();
}
}
}