Skip to content

Commit

Permalink
Merge pull request #576 from SharebookBR/meetups-youtube-only
Browse files Browse the repository at this point in the history
Desabilitando job meetups + pequenas melhorias
  • Loading branch information
raffacabofrio authored Dec 22, 2024
2 parents c456f50 + a4593f5 commit 2bf7b7f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions ShareBook/ShareBook.Repository/ShareBookSeeder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down
6 changes: 3 additions & 3 deletions ShareBook/ShareBook.Service/Meetup/MeetupService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ private async Task<YoutubeDto> GetYoutubeVideosAsync(int level = 1, string pageT
catch (FlurlHttpException e)
{
var dtoError = await e.GetResponseJsonAsync<YoutubeDtoError>();

throw new ShareBookException(dtoError == null ? e.Message : dtoError.error.Message);
}

Expand All @@ -130,9 +129,10 @@ private async Task<YoutubeDtoDetail> GetYoutubeVideoDetailsAsync(string id)


}
catch(Exception ex)
catch(FlurlHttpException e)
{
Console.WriteLine(ex.ToString());
var dtoError = await e.GetResponseJsonAsync<YoutubeDtoError>();
throw new ShareBookException(dtoError == null ? e.Message : dtoError.error.Message);
}

return youtubeDto;
Expand Down
2 changes: 1 addition & 1 deletion ShareBook/Sharebook.Jobs/Jobs/4 - MeetupSearch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2bf7b7f

Please sign in to comment.