mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 09:27:43 +00:00
log_event: Don't flush the log file right before we close it
There's no need. (imported from commit 8c3b933b7fddfb858ee4dc201b63b6fe921dc8e9)
This commit is contained in:
@@ -479,7 +479,6 @@ def log_event(event):
|
|||||||
fcntl.flock(lock, fcntl.LOCK_EX)
|
fcntl.flock(lock, fcntl.LOCK_EX)
|
||||||
f = open(settings.MESSAGE_LOG, "a")
|
f = open(settings.MESSAGE_LOG, "a")
|
||||||
f.write(simplejson.dumps(event) + "\n")
|
f.write(simplejson.dumps(event) + "\n")
|
||||||
f.flush()
|
|
||||||
f.close()
|
f.close()
|
||||||
fcntl.flock(lock, fcntl.LOCK_UN)
|
fcntl.flock(lock, fcntl.LOCK_UN)
|
||||||
lock.close()
|
lock.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user