mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-31 02:21:35 +00:00
Add option to disable order logging
This commit is contained in:
parent
847a1905b1
commit
4fe69da565
@ -101,7 +101,12 @@ PENALTY_TIMEOUT = 60
|
|||||||
# Time between routing attempts of buyer invoice in MINUTES
|
# Time between routing attempts of buyer invoice in MINUTES
|
||||||
RETRY_TIME = 1
|
RETRY_TIME = 1
|
||||||
|
|
||||||
# Platform activity limits
|
# Store Order Logs in DB. Verbose logging for each order as property of the order object in DB. Useful for debugging and for learning
|
||||||
|
# the order flow for new robosats coordinators (prints a pretty timestamped table on the coordinator panel on each order). But a bit heavy
|
||||||
|
# on write operations and can potentially affect performance for every request.
|
||||||
|
DISABLE_ORDER_LOGS = False
|
||||||
|
|
||||||
|
# Coordinator activity limits
|
||||||
MAX_PUBLIC_ORDERS = 100
|
MAX_PUBLIC_ORDERS = 100
|
||||||
|
|
||||||
# Trade limits in satoshis
|
# Trade limits in satoshis
|
||||||
|
@ -287,6 +287,8 @@ class Order(models.Model):
|
|||||||
try/catch block since this function is called inside the main request->response
|
try/catch block since this function is called inside the main request->response
|
||||||
pipe and any error here would lead to a 500 response.
|
pipe and any error here would lead to a 500 response.
|
||||||
"""
|
"""
|
||||||
|
if config("DISABLE_ORDER_LOGS", cast=bool, default=True):
|
||||||
|
return
|
||||||
try:
|
try:
|
||||||
timestamp = timezone.now().replace(microsecond=0).isoformat()
|
timestamp = timezone.now().replace(microsecond=0).isoformat()
|
||||||
level_in_tag = "" if level == "INFO" else "<b>"
|
level_in_tag = "" if level == "INFO" else "<b>"
|
||||||
|
Loading…
Reference in New Issue
Block a user