Stale filing data when running in Fast API? #125
Closed
martinnormark
started this conversation in
General
Replies: 1 comment 1 reply
-
|
The function is defined as @lru_cache(maxsize=16)
def get_by_accession_number(accession_number: str, show_progress: bool = True):I'm not sure exactly what could be causing the issue but I'm refactoring and testing that the function won't be cached whenever it returns None |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a Fast API application that I host on Railway. It has a few simple endpoints wrapping the functionality from this repo (awesome library!).
I poll the recent filings feed from SEC at an interval, and then call my API endpoint to get filing details by accession number.
The API wrapper looks like this:
After my API have been running for a day or so, it begins to throw 404 from the above code. So an accession number e.g.
0001493152-24-041216is not found.I then test the same via a Colab notebook and it returns just fine. Then I restart the service on Railway and when it is back up, it can get the filing just fine.
Could there be any caching or other mechanism that could cause this?
Beta Was this translation helpful? Give feedback.
All reactions