Skip to content

[Bug] The log output for scheduled tasks has a significant delay #13453

Description

@pooneyy

Contact Information

No response

1Panel Version

2.2.4

Problem Description

“计划任务”的日志输出有较大延迟,似乎是攒够一波内容后一口气显示。

Steps to Reproduce

例 1,600 秒的内容被一口气输出

测试代码

import time

for i in range(20):
    print(f"当前时间:{time.strftime('%Y-%m-%d %H:%M:%S', time.localtime())}")
    time.sleep(30)
Image

例 2,当积攒的日志内容足够多时,一口气输出 3 至 4 分钟内的日志

测试代码

import time

for i in range(600):
    print(f"当前时间:{time.strftime('%Y-%m-%d %H:%M:%S', time.localtime())}")
    time.sleep(1)

2debdace-5d63-4d18-a50f-c959584463e8.log

Image

The expected correct result

No response

Related log output

Additional Information

No response

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions