Mirrowel commited on
Commit
d7c643f
·
1 Parent(s): 2eb0cb6

docs(background): reduce default background job interval from 15min to 5min

Browse files
src/rotator_library/background_refresher.py CHANGED
@@ -178,7 +178,7 @@ class BackgroundRefresher:
178
  self._provider_job_tasks[provider] = task
179
 
180
  job_name = config.get("name", "background_job")
181
- interval = config.get("interval", 900)
182
  lib_logger.info(f"Started {provider} {job_name} (interval: {interval}s)")
183
 
184
  async def _run_provider_background_job(
@@ -197,7 +197,7 @@ class BackgroundRefresher:
197
  credentials: List of credential paths for this provider
198
  config: Background job configuration from get_background_job_config()
199
  """
200
- interval = config.get("interval", 900)
201
  job_name = config.get("name", "background_job")
202
  run_on_start = config.get("run_on_start", True)
203
 
 
178
  self._provider_job_tasks[provider] = task
179
 
180
  job_name = config.get("name", "background_job")
181
+ interval = config.get("interval", 300)
182
  lib_logger.info(f"Started {provider} {job_name} (interval: {interval}s)")
183
 
184
  async def _run_provider_background_job(
 
197
  credentials: List of credential paths for this provider
198
  config: Background job configuration from get_background_job_config()
199
  """
200
+ interval = config.get("interval", 300)
201
  job_name = config.get("name", "background_job")
202
  run_on_start = config.get("run_on_start", True)
203
 
src/rotator_library/providers/antigravity_provider.py CHANGED
@@ -1057,7 +1057,7 @@ class AntigravityProvider(
1057
  and stores it in UsageManager for accurate quota estimation.
1058
  """
1059
  return {
1060
- "interval": self._quota_refresh_interval, # default 900s (15 min)
1061
  "name": "quota_baseline_refresh",
1062
  "run_on_start": True, # fetch baselines immediately at startup
1063
  }
 
1057
  and stores it in UsageManager for accurate quota estimation.
1058
  """
1059
  return {
1060
+ "interval": self._quota_refresh_interval, # default 300s (5 min)
1061
  "name": "quota_baseline_refresh",
1062
  "run_on_start": True, # fetch baselines immediately at startup
1063
  }
src/rotator_library/providers/provider_interface.py CHANGED
@@ -576,7 +576,7 @@ class ProviderInterface(ABC):
576
  Returns:
577
  None if no background job, otherwise:
578
  {
579
- "interval": 900, # seconds between runs
580
  "name": "my_job", # for logging (e.g., "quota_refresh")
581
  "run_on_start": True, # whether to run immediately at startup
582
  }
 
576
  Returns:
577
  None if no background job, otherwise:
578
  {
579
+ "interval": 300, # seconds between runs
580
  "name": "my_job", # for logging (e.g., "quota_refresh")
581
  "run_on_start": True, # whether to run immediately at startup
582
  }
src/rotator_library/providers/utilities/antigravity_quota_tracker.py CHANGED
@@ -146,7 +146,7 @@ class AntigravityQuotaTracker:
146
  The provider class must initialize these instance attributes in __init__:
147
  self._learned_costs: Dict[str, Dict[str, float]] = {}
148
  self._learned_costs_loaded: bool = False
149
- self._quota_refresh_interval: int = 900 # 15 min default
150
  """
151
 
152
  # Type hints for attributes that must exist on the provider
 
146
  The provider class must initialize these instance attributes in __init__:
147
  self._learned_costs: Dict[str, Dict[str, float]] = {}
148
  self._learned_costs_loaded: bool = False
149
+ self._quota_refresh_interval: int = 300 # 5 min default
150
  """
151
 
152
  # Type hints for attributes that must exist on the provider