I need to be able to restart my server based on a specific database
change.
I’ve been trying a call to system(“script/process/reaper -a graceful -d
dispatch.fcgi”) but that raises a transaction error which rolls back the
save. I wasn’t aware that after_save would rollback. That’s potentially
useful but pretty much not right now. Here’s my code:
def after_update
system("#{RAILS_ROOT}/script/process/reaper -a graceful -d
dispatch.fcgi")
if routing_modified?
end
I’ve also looked at calling the Killer in
“vendor/rails/railties/lib/commands/process/reaper” but can’t figure out
how
to pass it the correct parameters when just requiring
“commands/process/reaper” calls an instance of Killer.
I’d really appreciate your help, kittens. Before I forget, I’m running
Apache2 [no Mongrel, sadly] and Edge Rails if that makes a difference.
RSL