I have written some Python code to act as a chatbot working with Slack. All looks good so far. I could add it as a service to /etc/init.d etc and make it work at startup. However...
I want to enhance the service to access my MySQL database using the Web2py DAL. Now, I created a webservice to do this - but of course when run the Apache server eventually times out and I get a 500 error. Is there a simple way of creating a permanently running service that can access models, the DAL etc?
Now, in the web2py directory, I guess I could run:
python -M -S myapp/controller/function
But I need to add credentials to the command too? How do I do this?
Assuming there's a way to provide credentials through the shell, would a permanently running service created this way cause any other issues?
thanks, Paul.