Skip to content

chore: single retry helper across services #65

Description

@2ndtlmining

Supersedes the code-quality half of #52 with the current state of the code.

There are now four separate retry implementations with different policies:

Location Policy
cloudService.js retryApiCall() 2 attempts, 1s fixed delay
runningAppsProvider.js 3 attempts, 5s fixed delay
backupService.js withRetry() attempts with backoff
hostLocationService.js provider fallback, no retry

backupService.js's version is the best starting point. Extract it to src/lib/retry.js and use it everywhere, keeping per-caller attempt counts and delays as arguments rather than flattening every call site to one policy.

While doing it, cloudService.js and wordpressService.js still use console.log/console.error in places and bypass the pino logger introduced in #36.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debtCleanup and consistency work

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions