protected override void RunJobImplementation() { if (!_rioConfiguration.AllowOpenETSync) { return; } var nonFinalizedWaterYears = _rioDbContext.WaterYear.Where(x => !x.FinalizeDate.HasValue); if (!nonFinalizedWaterYears.Any()) { return; } nonFinalizedWaterYears.ToList().ForEach(x => { OpenETGoogleBucketHelpers.TriggerOpenETGoogleBucketRefresh(_rioConfiguration, _rioDbContext, x.WaterYearID); }); }
protected override void RunJobImplementation() { if (!_rioConfiguration.AllowOpenETSync) { return; } //If we access the bucket too early, it can sometimes cause issues with writing to the buckets, so make sure it's been at least 15 minutes before going for it var inProgressSyncs = _rioDbContext.OpenETSyncHistory .Where(x => x.OpenETSyncResultTypeID == (int)OpenETSyncResultTypeEnum.InProgress).ToList(); if (inProgressSyncs.Any()) { inProgressSyncs.ForEach(x => { OpenETGoogleBucketHelpers.UpdateParcelMonthlyEvapotranspirationWithETData(_rioDbContext, _rioConfiguration, x.OpenETSyncHistoryID); }); } }