hug icon indicating copy to clipboard operation
hug copied to clipboard

Global Variables / State Management

Open dgotbaum opened this issue 5 years ago • 0 comments

I am trying to build an API that initially queries a database and stores the data in a dataframe that the different endpoints read from.

The problem is, I need to update this dataframe every 15 and the call takes a decent amount of time.

What is the best way to manage the global df and have it call a database every 15 minutes?

I tried using a middleware function but it cannot access the global "df".

dgotbaum avatar Apr 08 '20 20:04 dgotbaum