Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
sunxiaojian committed Oct 10, 2024
1 parent c54c41b commit 246e6f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,19 @@
/** A manager to create and expire branches. */
public class BranchAutoManager {

private final BranchTimeExpire branchTimeExpire;
private final BranchManager branchManager;

private BranchAutoManager(BranchTimeExpire branchTimeExpire) {
this.branchTimeExpire = branchTimeExpire;
private BranchAutoManager(BranchManager branchManager) {
this.branchManager = branchManager;
}

public void run() {
if (branchTimeExpire != null) {
branchTimeExpire.run();
if (branchManager != null) {
branchManager.expireBranches();
}
}

public static BranchAutoManager create(BranchManager branchManager) {
return new BranchAutoManager(BranchTimeExpire.create(branchManager));
}

public BranchTimeExpire getBranchTimeExpire() {
return branchTimeExpire;
return new BranchAutoManager(branchManager);
}
}

This file was deleted.

0 comments on commit 246e6f6

Please sign in to comment.