MCPcopy Index your code
hub / github.com/LangGraph-GUI/LangGraph-GUI-backend / flush

Method flush

src/ServerTee.py:44–56  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

42 self.notify_subscribers(message_with_timestamp)
43
44 def flush(self):
45 with self.lock:
46 if self.buffer:
47 line = self.buffer.strip()
48 if line:
49 timestamp = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
50 message_with_timestamp = f"{timestamp} - {line}\n"
51 self.stdout.write(message_with_timestamp)
52 self.file.write(message_with_timestamp)
53 self.notify_subscribers(message_with_timestamp)
54 self.buffer = ""
55 self.stdout.flush()
56 self.file.flush()
57
58 def close(self):
59 with self.lock:

Callers 3

closeMethod · 0.95
writeMethod · 0.80
loggerFunction · 0.80

Calls 2

notify_subscribersMethod · 0.95
writeMethod · 0.80

Tested by

no test coverage detected