fix: exit payload jobs:run process after completion (#13211)

### What?

Exit the process after running jobs.

### Why?

When running the `payload jobs:run` bin script with a postgres database
the process hangs forever.

### How?

Execute `process.exit(0)` after running all jobs.
This commit is contained in:
Jake Fell
2025-07-17 20:33:49 +01:00
committed by GitHub
parent a3361356b2
commit 4ae503d700

View File

@@ -133,7 +133,7 @@ export const bin = async () => {
await payload.destroy() // close database connections after running jobs so process can exit cleanly await payload.destroy() // close database connections after running jobs so process can exit cleanly
return process.exit(0)
} }
} }