feat: raise market_api rate to 20/min, add global Polygon cap at 45/min, add rate-limit API + watchlist warning
This commit is contained in:
@@ -13,7 +13,7 @@ from services.scheduler.app import (
|
||||
|
||||
class TestGetCadenceForSource:
|
||||
def test_default_cadence_market_api(self):
|
||||
assert get_cadence_for_source("market_api", None) == 60
|
||||
assert get_cadence_for_source("market_api", None) == 300
|
||||
|
||||
def test_default_cadence_news_api(self):
|
||||
assert get_cadence_for_source("news_api", {}) == 300
|
||||
@@ -57,7 +57,7 @@ class TestIsSourceDue:
|
||||
assert not is_source_due("market_api", None, last, "completed", 0, None, self._now())
|
||||
|
||||
def test_completed_past_cadence_is_due(self):
|
||||
last = self._now() - timedelta(seconds=120)
|
||||
last = self._now() - timedelta(seconds=400)
|
||||
assert is_source_due("market_api", None, last, "completed", 0, None, self._now())
|
||||
|
||||
def test_running_not_due(self):
|
||||
|
||||
Reference in New Issue
Block a user