Skip to content

Commit 47a9435

Browse files
authored
chore(ps:logs): support pod all logs
1 parent bf0da33 commit 47a9435

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

rootfs/api/consumers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,15 @@ async def receive(self, text_data=None, bytes_data=None):
141141
self.running = True
142142
data = json.loads(text_data)
143143
args = (self.pod_id, self.id)
144-
lines = data.get("lines", 100)
144+
lines = data.get("lines", 300)
145145
follow = data.get("follow", False)
146146
kwargs = {
147-
"tail_lines": lines if lines < 1000 else 1000,
148147
"follow": follow,
149148
"container": data.get("container", ""),
150149
"_preload_content": not follow,
151150
}
151+
if lines > 0:
152+
kwargs["tail_lines"] = lines
152153
self.response = await sync_to_async(self.kubernetes.read_namespaced_pod_log)(
153154
*args, **kwargs)
154155
if follow:

0 commit comments

Comments
 (0)