Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow rate limit check to run when not running #2462

Merged
merged 1 commit into from
Jan 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions custom_components/hacs/tasks/check_ratelimit.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ class Task(HacsTask):

async def async_execute(self) -> None:
"""Execute the task."""
if not self.hacs.stage == HacsStage.RUNNING:
self.task_logger(self.hacs.log.debug, "HACS is not running")
return
if (
not self.hacs.system.disabled
or self.hacs.system.disabled_reason != HacsDisabledReason.RATE_LIMIT
Expand Down
2 changes: 1 addition & 1 deletion tests/tasks/test_check_ratelimit.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async def test_check_ratelimit_not_running(hacs: HacsBase, caplog: pytest.LogCap
assert task

await task.execute_task()
assert "HacsTask<check_ratelimit> HACS is not running" in caplog.text
assert "HacsTask<check_ratelimit> HACS is not ratelimited" in caplog.text


@pytest.mark.asyncio
Expand Down