diff --git a/ShareBook/ShareBook.Repository/ShareBookSeeder.cs b/ShareBook/ShareBook.Repository/ShareBookSeeder.cs index 1412f19c..5addfd0c 100644 --- a/ShareBook/ShareBook.Repository/ShareBookSeeder.cs +++ b/ShareBook/ShareBook.Repository/ShareBookSeeder.cs @@ -28,8 +28,7 @@ public void Seed() if (!(_context.Users.Any() && _context.Books.Any() - && _context.Categories.Any() - && _context.Meetups.Any())) + && _context.Categories.Any())) { var grantee = new User() { diff --git a/ShareBook/ShareBook.Service/Meetup/MeetupService.cs b/ShareBook/ShareBook.Service/Meetup/MeetupService.cs index 03117bbc..f421201e 100644 --- a/ShareBook/ShareBook.Service/Meetup/MeetupService.cs +++ b/ShareBook/ShareBook.Service/Meetup/MeetupService.cs @@ -106,7 +106,6 @@ private async Task GetYoutubeVideosAsync(int level = 1, string pageT catch (FlurlHttpException e) { var dtoError = await e.GetResponseJsonAsync(); - throw new ShareBookException(dtoError == null ? e.Message : dtoError.error.Message); } @@ -130,9 +129,10 @@ private async Task GetYoutubeVideoDetailsAsync(string id) } - catch(Exception ex) + catch(FlurlHttpException e) { - Console.WriteLine(ex.ToString()); + var dtoError = await e.GetResponseJsonAsync(); + throw new ShareBookException(dtoError == null ? e.Message : dtoError.error.Message); } return youtubeDto; diff --git a/ShareBook/Sharebook.Jobs/Jobs/4 - MeetupSearch.cs b/ShareBook/Sharebook.Jobs/Jobs/4 - MeetupSearch.cs index 0610cdab..505cef94 100644 --- a/ShareBook/Sharebook.Jobs/Jobs/4 - MeetupSearch.cs +++ b/ShareBook/Sharebook.Jobs/Jobs/4 - MeetupSearch.cs @@ -20,7 +20,7 @@ public MeetupSearch(IJobHistoryRepository jobHistoryRepo, IMeetupService meetupS JobName = "MeetupSearch"; Description = "Atualiza a lista de Meetups do Sharebook com base no youtube."; Interval = Interval.Dayly; - Active = true; + Active = false; BestTimeToExecute = new TimeSpan(1, 0, 0); _configuration = configuration; }