15.07.2024, 06:30
You can't use copas or any long-running code from the web server context directly. For app daemons use this code:
To handle user actions either use a separate .lp file that is called remotely using fetch() or $.get(). Or create a form and use getvar() in the .lp file to check whether a certain parameter has been passed or not. Check this sample app: https://forum.logicmachine.net/showthrea...5#pid33575
Code:
require('apps.daemon').stop('myappname')
require('apps.daemon').start('myappname')
To handle user actions either use a separate .lp file that is called remotely using fetch() or $.get(). Or create a form and use getvar() in the .lp file to check whether a certain parameter has been passed or not. Check this sample app: https://forum.logicmachine.net/showthrea...5#pid33575