Skip to content

Commit

Permalink
refactor(util): default cleanup delay
Browse files Browse the repository at this point in the history
  • Loading branch information
ddkasa committed Oct 4, 2024
1 parent c420839 commit dd29567
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def _path_cleanup(cache_path: Path) -> None:
cache_path.rmdir()


def _tracker_cleanup(cache: TogglCache, wid: int, config: BasicAuth, delay: int = 0) -> None:
def _tracker_cleanup(cache: TogglCache, wid: int, config: BasicAuth, delay: int = 1) -> None:
user_object = UserEndpoint(wid, config, cache)
trackers = user_object.collect(refresh=True)
endpoint = TrackerEndpoint(wid, config, cache)
Expand All @@ -37,7 +37,7 @@ def _tracker_cleanup(cache: TogglCache, wid: int, config: BasicAuth, delay: int
time.sleep(delay)


def _project_cleanup(cache: TogglCache, wid: int, config: BasicAuth, delay: int = 0) -> None:
def _project_cleanup(cache: TogglCache, wid: int, config: BasicAuth, delay: int = 1) -> None:
endpoint = ProjectEndpoint(wid, config, cache)
projects = endpoint.collect(refresh=True)
for project in projects:
Expand All @@ -47,7 +47,7 @@ def _project_cleanup(cache: TogglCache, wid: int, config: BasicAuth, delay: int
time.sleep(delay)


def _client_cleanup(cache: TogglCache, wid: int, config: BasicAuth, delay: int = 0) -> None:
def _client_cleanup(cache: TogglCache, wid: int, config: BasicAuth, delay: int = 1) -> None:
endpoint = ClientEndpoint(wid, config, cache)
clients = endpoint.collect(refresh=True)
for client in clients:
Expand All @@ -57,7 +57,7 @@ def _client_cleanup(cache: TogglCache, wid: int, config: BasicAuth, delay: int =
time.sleep(delay)


def _tag_cleanup(cache: TogglCache, wid: int, config: BasicAuth, delay: int = 0) -> None:
def _tag_cleanup(cache: TogglCache, wid: int, config: BasicAuth, delay: int = 1) -> None:
endpoint = TagEndpoint(wid, config, cache)
tags = endpoint.collect(refresh=True)
for tag in tags:
Expand Down

0 comments on commit dd29567

Please sign in to comment.