mirror of
https://github.com/whyour/qinglong.git
synced 2025-12-23 15:50:07 +08:00
Use consistent null checking pattern for PID validation
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
This commit is contained in:
parent
a56f2393a4
commit
8ae7a85bf8
|
|
@ -138,7 +138,7 @@ export default async () => {
|
|||
|
||||
for (const cron of allCrons) {
|
||||
// 如果任务有 PID 且进程仍在运行,则保持其状态
|
||||
if (cron.pid && isPidRunning(cron.pid)) {
|
||||
if (cron.pid != null && isPidRunning(cron.pid)) {
|
||||
// 保留当前状态(running 或 queued)
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user