Skip to content

Commit

Permalink
Trigger RepoStatsJob when Branch is created
Browse files Browse the repository at this point in the history
  • Loading branch information
byronantak committed Dec 16, 2024
1 parent 126e1b7 commit 266b7ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ private PollableFuture<Asset> addOrUpdateAssetAndProcessIfNeeded(
FilterConfigIdOverride filterConfigIdOverride,
List<String> filterOptions,
@InjectCurrentTask PollableTask currentTask)
throws InterruptedException, ExecutionException, UnsupportedAssetFilterTypeException {
throws InterruptedException, UnsupportedAssetFilterTypeException {

PollableFutureTaskResult<Asset> pollableFutureTaskResult = new PollableFutureTaskResult<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.box.l10n.mojito.quartz.QuartzJobInfo;
import com.box.l10n.mojito.quartz.QuartzPollableTaskScheduler;
import com.box.l10n.mojito.service.pollableTask.PollableFuture;
import com.box.l10n.mojito.service.repository.statistics.RepositoryStatisticsUpdatedReactor;
import com.box.l10n.mojito.service.tm.BranchSourceRepository;
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableMap;
Expand Down Expand Up @@ -42,6 +43,8 @@ public class BranchService {

@Autowired BranchSourceConfig branchSourceConfig;

@Autowired RepositoryStatisticsUpdatedReactor repositoryStatisticsUpdatedReactor;

@Value("${l10n.branchService.quartz.schedulerName:" + DEFAULT_SCHEDULER_NAME + "}")
String schedulerName;

Expand Down Expand Up @@ -72,6 +75,7 @@ public Branch getUndeletedOrCreateBranch(

if (branch == null) {
branch = createBranch(repository, branchName, createdByUser, branchNotifierIds);
repositoryStatisticsUpdatedReactor.generateEvent(branch.getRepository().getId());
} else if (branch.getDeleted()) {
undeleteBranch(branch);
}
Expand Down

0 comments on commit 266b7ba

Please sign in to comment.