This gives my daemon full access to the rails environment, and it may
run for days, months, many months or longer. I realized this could be
risky if there is some caching or other issues, in which case I would
launch some other external exec from the daemon instead perhaps to get
access to the environment, or possibly I could launch it the same way
and just do a fork and then do the DB operations in the child. Right
now I am just running it as shown with no such strategy.
This gives my daemon full access to the rails environment, and it may
run for days, months, many months or longer. I realized this could be
risky if there is some caching or other issues, in which case I would
launch some other external exec from the daemon instead perhaps to get
access to the environment, or possibly I could launch it the same way
and just do a fork and then do the DB operations in the child. Right
now I am just running it as shown with no such strategy.
You may want to look into the daemons gem. I've used it before and it
allows you to start, stop and restart daemon processes.