i setup a logic hook, for the opportunities module where after the user saves the opportunity it executes an ssh command on another server
sudo ssh -p 22 XXX@XXXXXXXXXXX 'python3 /home/scripts/apps/malla/nextcloud/opportunities/opportunities_update.py' 2>&1 &"
the problem is this script takes about a minute to run, so it takes like a minute of the browser to save the opportunity, trashing the user experience. I've tried to tweak the ssh parameters to try to make it run in the background to no avail. for the moment i'll disable it, if any suggestion please post on the comments.