IO-797 Add fault tolerance for scanning.
This commit is contained in:
@@ -5,7 +5,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Newtonsoft.Json.Linq;
|
||||
namespace BodyshopPartner.Utils
|
||||
{
|
||||
public static class DiskScan
|
||||
@@ -32,18 +32,22 @@ namespace BodyshopPartner.Utils
|
||||
};
|
||||
|
||||
dynamic job = Utils.Decoder.EstimateDecoder.CIECAEstimateImport.DecodeEstimate(envfp);
|
||||
|
||||
EstimatesOnDisk.Add(new ScanResponseItem()
|
||||
|
||||
if (!(job is Boolean))
|
||||
{
|
||||
Id = job.ciecaid,
|
||||
Filepath = envfp,
|
||||
Cieca_Id = job.ciecaid,
|
||||
Clm_No = job.clm_no,
|
||||
Owner = job.ownr_fn?.Value + " " + job.ownr_ln?.Value,
|
||||
Ins_Co_Nm = job.ins_co_nm?.Value,
|
||||
Vehicle = job.vehicle.data.v_model_yr.Value + " " + job.vehicle.data.v_make_desc.Value + " " + job.vehicle.data.v_model_desc.Value,
|
||||
|
||||
});
|
||||
EstimatesOnDisk.Add(new ScanResponseItem()
|
||||
{
|
||||
Id = job.ciecaid,
|
||||
Filepath = envfp,
|
||||
Cieca_Id = job.ciecaid,
|
||||
Clm_No = job.clm_no,
|
||||
Owner = job.ownr_fn?.Value + " " + job.ownr_ln?.Value,
|
||||
Ins_Co_Nm = job.ins_co_nm?.Value,
|
||||
Vehicle = job.vehicle.data.v_model_yr.Value + " " + job.vehicle.data.v_make_desc.Value + " " + job.vehicle.data.v_model_desc.Value,
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
logger.Info("Estimates found: " + ad1FilePaths.Count);
|
||||
return EstimatesOnDisk;
|
||||
|
||||
Reference in New Issue
Block a user