Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
yhaliaw committed Jan 31, 2024
1 parent 020bc6e commit 9bea9e2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src-docs/runner_manager.py.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Construct RunnerManager object for creating and managing runners.

---

<a href="../src/runner_manager.py#L711"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/runner_manager.py#L714"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>function</kbd> `build_runner_image`

Expand Down Expand Up @@ -172,7 +172,7 @@ Bring runners in line with target.

---

<a href="../src/runner_manager.py#L721"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>
<a href="../src/runner_manager.py#L724"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

### <kbd>function</kbd> `schedule_build_runner_image`

Expand Down
2 changes: 1 addition & 1 deletion src-docs/runner_manager_type.py.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Strategy for flushing runners.
**Attributes:**

- <b>`FLUSH_IDLE`</b>: Flush only idle runners.
- <b>`FLUSH_IDLE_WAIT_REPO_CHECK`</b>: Flush only idle runners, then wait until repo-policy-check is completed for the busy runners.
- <b>`FLUSH_IDLE_WAIT_REPO_CHECK`</b>: Flush only idle runners, then wait until repo-policy-check is completed for the busy runners.
- <b>`FORCE_FLUSH_BUSY`</b>: Force flush busy runners.
- <b>`FORCE_FLUSH_BUSY_WAIT_REPO_CHECK`</b>: Wait until the repo-policy-check is completed before force flush of busy runners.

Expand Down
5 changes: 4 additions & 1 deletion src/runner_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,10 @@ def flush(self, mode: FlushMode = FlushMode.FLUSH_IDLE) -> int:
runner.remove(remove_token)
logger.info(REMOVED_RUNNER_LOG_STR, runner.config.name)

if mode in (FlushMode.FLUSH_IDLE_WAIT_REPO_CHECK, FlushMode.FORCE_FLUSH_BUSY_WAIT_REPO_CHECK):
if mode in (
FlushMode.FLUSH_IDLE_WAIT_REPO_CHECK,
FlushMode.FORCE_FLUSH_BUSY_WAIT_REPO_CHECK,
):
for _ in range(5):
if not self._runners_in_pre_job():
break
Expand Down
2 changes: 1 addition & 1 deletion src/runner_manager_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class FlushMode(Enum):
Attributes:
FLUSH_IDLE: Flush only idle runners.
FLUSH_IDLE_WAIT_REPO_CHECK: Flush only idle runners, then wait until repo-policy-check is
FLUSH_IDLE_WAIT_REPO_CHECK: Flush only idle runners, then wait until repo-policy-check is
completed for the busy runners.
FORCE_FLUSH_BUSY: Force flush busy runners.
FORCE_FLUSH_BUSY_WAIT_REPO_CHECK: Wait until the repo-policy-check is completed before
Expand Down

0 comments on commit 9bea9e2

Please sign in to comment.