9 lines
406 B
JavaScript
9 lines
406 B
JavaScript
import { spawn } from 'node:child_process';
|
|
import { pythonPath, root } from './server.mjs';
|
|
|
|
const child = spawn(pythonPath(), ['-m', 'scripts.check_postgres'], {
|
|
cwd: root, env: { ...process.env, PYTHONUTF8: '1' }, stdio: 'inherit', windowsHide: true,
|
|
});
|
|
child.on('error', error => { console.error(error.message); process.exitCode = 1; });
|
|
child.on('exit', code => { process.exitCode = code || 0; });
|