diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d463df..5a7d707 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ n.n.n / 2023-09-09 ================== - + * doc: Updated changelog and readme v1.0.0 / 2023-09-09 =================== diff --git a/Taskfile.yaml b/Taskfile.yaml index 55c9f09..9a710ab 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -4,6 +4,7 @@ vars: tasks: default: - task: test + - task: commit test: silent: false interactive: false diff --git a/docs/fedi_gatus/shared/db.md b/docs/fedi_gatus/shared/db.md index 1ddf675..dc90f8d 100644 --- a/docs/fedi_gatus/shared/db.md +++ b/docs/fedi_gatus/shared/db.md @@ -71,7 +71,7 @@ Classes `get_single_record(self) ‑> dict` : - `get_top_lemmy_instances(self) ‑> list[fedi_gatus.shared.db.Model]` + `get_top_lemmy_instances(self, count=25) ‑> list[fedi_gatus.shared.db.Model]` : `initialize(self)` diff --git a/fedi_gatus/shared/db.py b/fedi_gatus/shared/db.py index 4ac2dc2..8820b95 100644 --- a/fedi_gatus/shared/db.py +++ b/fedi_gatus/shared/db.py @@ -72,14 +72,17 @@ def __init__(self, *args, **kwargs): def get_single_record(self) -> dict: return self.select().get() - def get_top_lemmy_instances(self) -> list[Model]: - NUMBER_OF_SERVERS = int(os.getenv("NUMBER_OF_SERVERS")) + def get_top_lemmy_instances(self, count=25) -> list[Model]: + # TODO Add env var for count + + if not os.getenv("TEST_MODE"): + count = int(os.getenv("NUMBER_OF_SERVERS")) logging.info("Number of Rows:" + str(DbAccess.select().count())) d = ( DbAccess.select() .where(DbAccess.software_name == "Lemmy") .order_by(DbAccess.stats_monthly_active_users) - .limit(NUMBER_OF_SERVERS) + .limit(count) ) info = [] for i in d: diff --git a/pyproject.toml b/pyproject.toml index 6ef9a9a..55cf6d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "fedi_gatus" -version = "v0.1.0" +version = "v1.0.0" description = "" authors = ["Jesse Schoepfer "] readme = "README.md"