You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have PostgreSQL and pgAgent installed on a Debian server. I schedule a pgAgent job to run a step using Poetry as follows:
cd /srv/lib/myservice
poetry run /srv/lib/myservice/bin/myscript.py
This successfully ran the first time, but failed all runs after that. If I restart the systemd service for pgAgent, then the next run of the job succeeds, but subsequent runs fail again. I suspect there's some vestigial remains from the first Poetry run that causes the env to become messed up and no longer valid?
If I insert a "poetry env info" into that job script before poetry run, the first run after a restart reports a healthy env and runs the script, but the second failed run doesn't have any output at all.
If I try "poetry shell" instead, I get an error "(25, 'inappropriate ioctl for device')" and "python not found".
If I put in two 'poetry run' calls in the job script, then both run OK. It's only when a new job script run gets spawned that the failures occur.
Any suggestions on what might be going wrong here?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have PostgreSQL and pgAgent installed on a Debian server. I schedule a pgAgent job to run a step using Poetry as follows:
This successfully ran the first time, but failed all runs after that. If I restart the systemd service for pgAgent, then the next run of the job succeeds, but subsequent runs fail again. I suspect there's some vestigial remains from the first Poetry run that causes the env to become messed up and no longer valid?
If I insert a "poetry env info" into that job script before poetry run, the first run after a restart reports a healthy env and runs the script, but the second failed run doesn't have any output at all.
If I try "poetry shell" instead, I get an error "(25, 'inappropriate ioctl for device')" and "python not found".
If I put in two 'poetry run' calls in the job script, then both run OK. It's only when a new job script run gets spawned that the failures occur.
Any suggestions on what might be going wrong here?
Beta Was this translation helpful? Give feedback.
All reactions