Updated Blight and Zonering

This commit is contained in:
2021-03-01 14:04:18 +01:00
parent a29b973268
commit 6debe82085
8 changed files with 80 additions and 31 deletions

View File

@@ -48,14 +48,19 @@ namespace FarmmapsZonering.Services
_logger.LogError($"Something went wrong with task execution: {itemTask.Message}");
return null;
}
var itemName = $"VRAZonering";
var applianceMapItem = await _generalService.FindChildItemAsync(cropfieldItem.Code,
GEOTIFF_PROCESSED_ITEMTYPE, itemName,
//i => i.Updated >= itemTask.Finished.GetValueOrDefault(DateTime.UtcNow) &&
// i.Name.ToLower().Contains(itemName.ToLower()));
i =>
i.Name.ToLower().Contains(itemName.ToLower()));
var uploadedFilesChildren = await _farmmapsApiService.GetItemChildrenAsync(cropfieldItem.Code);
//int last = uploadedFilesChildren.Count - 1;
//var applianceMapItem = uploadedFilesChildren[last];
var itemName = output.Name;
//var itemName = $"VRAZonering";
var applianceMapItem = await _generalService.FindChildItemAsync(cropfieldItem.Code,
GEOTIFF_PROCESSED_ITEMTYPE, itemName,
i => i.Updated >= itemTask.Finished.GetValueOrDefault(DateTime.UtcNow) &&
i.Name.ToLower().Contains(itemName.ToLower()));
if (applianceMapItem == null)
{
_logger.LogError("Could not find the VRAZonering geotiff child item under cropfield");