From: Josh Cheek Date: 2012-04-13T14:21:23+09:00 Subject: Re: Change the value of a variable inside a running ruby program. --f46d0443066c8fb15304bd88a4bf Content-Type: text/plain; charset=ISO-8859-1 On Thu, Apr 12, 2012 at 8:38 PM, Matthew Smith wrote: > I have a program that is running constantly and I'd like to be able to > change the value of a variable inside it from the outside by doing > something on the command line. > > Ideally, this would happen via an interrupt process so that the program > doesn't have to continuously poll some resource. > > Right now, the program just polls mysql every few seconds to see if > someone has changed a setting which is stored in a table. Ideally, I'd > like the program to read from the table on startup but then not have to > poll mysql anymore to see if the setting has been changed. > > Hopefully I'm making sense here... > > -- > Posted via http://www.ruby-forum.com/. > > You might be able to use DRb to expose those settings (I don't know much about it, but this seems like the kind of thing it could do). --f46d0443066c8fb15304bd88a4bf Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Thu, Apr 12, 2012 at 8:38 PM, Matthew Smith <lists@ruby-forum.com> wrote= :
I have a program that is running constantly and I'd like to be able to<= br> change the value of a variable inside it from the outside by doing
something on the command line.

Ideally, this would happen via an interrupt process so that the program
doesn't have to continuously poll some resource.

Right now, the program just polls mysql every few seconds to see if
someone has changed a setting which is stored in a table. =A0Ideally, I'= ;d
like the program to read from the table on startup but then not have to
poll mysql anymore to see if the setting has been changed.

Hopefully I'm making sense here...

--
Posted via http://= www.ruby-forum.com/.


You might be able to use DRb to e= xpose those settings (I don't know much about it, but this seems like t= he kind of thing it could do).
--f46d0443066c8fb15304bd88a4bf--