protected override async Task Execute() { if (await AnotherSubscriptionExist()) { return; } var analyzer = new PullRequestAnalyzer(DbContext, null, null); await analyzer.Analyze(Subscription.Id); }
private async Task AnalyzePullRequests(long subscriptionId, SophiaDbContext dbContext, GitHubOption gitHubOption, GitHubRepositoryPullRequestService gitHubRepositoryPullRequestService) { try { var analyzer = new PullRequestAnalyzer(dbContext, gitHubOption, gitHubRepositoryPullRequestService); await analyzer.Analyze(subscriptionId); await dbContext.SaveChangesAsync(); } catch (Exception e) { _logger.LogError("ApplyPullRequestsJob: Exception {exception} in {subscriptionId}", e.ToString(), subscriptionId); throw; } }