fix worker warning
This commit is contained in:
1 parent
bf65965b26
commit
2da61539cc
2 files changed
+1
-15
No files matched your search
@@ -87,7 +87,7 @@ def when_ready(server):
|
|||||||
# Add commit hash to the last line of banner
|
# Add commit hash to the last line of banner
|
||||||
banner_lines = banner_text.rstrip("\n").split("\n")
|
banner_lines = banner_text.rstrip("\n").split("\n")
|
||||||
if banner_lines:
|
if banner_lines:
|
||||||
banner_lines[-1] += f" {commit_hash}"
|
banner_lines[-1] += f" - {commit_hash}"
|
||||||
|
|
||||||
print("\n".join(banner_lines))
|
print("\n".join(banner_lines))
|
||||||
print("Built for PLAY-WELL TEKNOLOGIES by contact@studspider.sh\n\n")
|
print("Built for PLAY-WELL TEKNOLOGIES by contact@studspider.sh\n\n")
|
||||||
|
|||||||
@@ -15,20 +15,6 @@ SQUARE_WEBHOOK_SIGNATURE_KEY = sq_env.SQUARE_WEBHOOK_SIGNATURE_KEY
|
|||||||
SQUARE_WEBHOOK_URL = sq_env.SQUARE_WEBHOOK_URL
|
SQUARE_WEBHOOK_URL = sq_env.SQUARE_WEBHOOK_URL
|
||||||
SQUARE_LEGO_CAT_ID = sq_env.LEGO_CAT_ID
|
SQUARE_LEGO_CAT_ID = sq_env.LEGO_CAT_ID
|
||||||
|
|
||||||
|
|
||||||
# Debug: Print configuration only in development or once per process
|
|
||||||
# When running under gunicorn, the on_starting hook handles this
|
|
||||||
if not os.getenv("GUNICORN_CMD_ARGS"):
|
|
||||||
if SQUARE_WEBHOOK_SIGNATURE_KEY:
|
|
||||||
print(f"[CONFIG] Signature key loaded: {SQUARE_WEBHOOK_SIGNATURE_KEY[:10]}...")
|
|
||||||
else:
|
|
||||||
print("[CONFIG] WARNING: SQUARE_WEBHOOK_SIGNATURE_KEY not set!")
|
|
||||||
|
|
||||||
if SQUARE_WEBHOOK_URL:
|
|
||||||
print(f"[CONFIG] Webhook URL: {SQUARE_WEBHOOK_URL}")
|
|
||||||
else:
|
|
||||||
print("[CONFIG] WARNING: SQUARE_WEBHOOK_URL not set!")
|
|
||||||
|
|
||||||
# In-memory store for processed event IDs (idempotency)
|
# In-memory store for processed event IDs (idempotency)
|
||||||
processed_event_ids = set()
|
processed_event_ids = set()
|
||||||
MAX_STORED_EVENT_IDS = 10000
|
MAX_STORED_EVENT_IDS = 10000
|
||||||
|
|||||||
Reference in new issue
Block a user