From af7224c003bc1c139f8b7d7e5a6874e8b621b682 Mon Sep 17 00:00:00 2001 From: Scott Yeager Date: Thu, 10 Oct 2024 17:22:16 -0700 Subject: [PATCH] Use config.py to set live reload --- config.sample.py | 1 + main.py | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 config.sample.py diff --git a/config.sample.py b/config.sample.py new file mode 100644 index 0000000..e6257bb --- /dev/null +++ b/config.sample.py @@ -0,0 +1 @@ +LIVE_RELOAD = True diff --git a/main.py b/main.py index d3a092d..f66fda3 100644 --- a/main.py +++ b/main.py @@ -8,6 +8,12 @@ from lightdark import LightDarkScript, LightLink, DarkLink from receipts import ReceiptHandler +try: + from config import LIVE_RELOAD +except: + LIVE_RELOAD = True + + RECEIPTS_URL = "https://alpha.minting.tfchain.grid.tf/api/v1/" CSV_DIR = "csvs" @@ -25,7 +31,7 @@ # We can run into some trouble with multiple threads trying to use gql at the # same time. Bit primitive, but we just lock it for now gql_lock = threading.Lock() -app, rt = fast_app(live=True) +app, rt = fast_app(live=LIVE_RELOAD) receipt_handler = ReceiptHandler()