Ejemplo n.º 1
0
        protected override async Task Execute()
        {
            if (await AnotherSubscriptionExist())
            {
                return;
            }


            var analyzer = new PullRequestAnalyzer(DbContext, null, null);
            await analyzer.Analyze(Subscription.Id);
        }
Ejemplo n.º 2
0
        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;
            }
        }