Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Ruby (http://www.velocityreviews.com/forums/f66-ruby.html)
-   -   Daemons lib not dong much?... (http://www.velocityreviews.com/forums/t854829-daemons-lib-not-dong-much.html)

sa 125 12-18-2008 02:04 PM

Daemons lib not dong much?...
 
Hello - I'm trying to run a background daemon that will monitor changes
in a mysql database. The file to monitor the changes works fine when run
by itself from the prompt as
$ ruby changes.rb

However, when I try to use it in a daemon file, not much happens. Here's
the file (changes_daemon.rb):

require 'daemons'
# all the other required come here

def main
Daemons.run(path_to_file)
end

if __FILE__ == $0
main
end


When I run this at the prompt:
$ruby changes_daemon.rb start
$ (next shell line after hitting return - no errors)

Nothing happens (it's supposed to write to a table and a log file, so I
can see if anything occurs).

Any insights will be great - thanks!
--
Posted via http://www.ruby-forum.com/.



All times are GMT. The time now is 01:34 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.