fix: Remove misleading os.O_NONBLOCK flag (#28859)
This works likes this in C `open(2)` on file descriptor, not in python :) In python it's setting buffering to enum value which in this case is 2048, if it were lower number this would've made performance worse. ref: - https://man7.org/linux/man-pages/man2/open.2.html#DESCRIPTION - https://docs.python.org/3/library/functions.html#open
This commit is contained in:
parent
df7c8b1f88
commit
e85aa44843
1 changed files with 1 additions and 1 deletions
|
|
@ -127,7 +127,7 @@ def flush():
|
|||
logs = frappe.cache.lrange(MONITOR_REDIS_KEY, 0, -1)
|
||||
if logs:
|
||||
logs = list(map(frappe.safe_decode, logs))
|
||||
with open(log_file(), "a", os.O_NONBLOCK) as f:
|
||||
with open(log_file(), "a") as f:
|
||||
f.write("\n".join(logs))
|
||||
f.write("\n")
|
||||
# Remove fetched entries from cache
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue