Grant Blakeman
2008-Sep-18 17:52 UTC
[Backgroundrb-devel] Client disconected error - trying to upgrade to latest version of backgroundrb
Hi, I''ve had a project using a really old version of backgroundrb (don''t remember which one) to simply send out some e-mails in the background. I''m currently trying to upgrade the project so that I can learn more about backgroundrb and use some of its other features. I''ve tried rewriting my worker call to work with the latest version (see below), but every time I try it, the debug log simply prints ''Client disconected'' and nothing happens. Am I doing something wrong? In my controller: MiddleMan.worker(:david_worker).async_do_work(:args => { :email => @user.email, :url => @user.reset_password_code, :mail_type => :forgot_password_email }) ------------------- In my worker: set_worker_name :david_worker def create(args = nil) # this method is called, when worker is loaded for the first time end def do_work(args) Notifier.send("deliver_#{args[:mail_type]}", args) end Thanks in advance for any tips! -- -Grant Blakeman grant.blakeman at gmail.com http://grantblakeman.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080918/cbce3560/attachment.html>
hemant
2008-Sep-18 18:22 UTC
[Backgroundrb-devel] Client disconected error - trying to upgrade to latest version of backgroundrb
To pass arguments you use :arg not :args. On Thu, Sep 18, 2008 at 11:22 PM, Grant Blakeman <grant.blakeman at gmail.com> wrote:> Hi, I''ve had a project using a really old version of backgroundrb (don''t > remember which one) to simply send out some e-mails in the background. I''m > currently trying to upgrade the project so that I can learn more about > backgroundrb and use some of its other features. > I''ve tried rewriting my worker call to work with the latest version (see > below), but every time I try it, the debug log simply prints ''Client > disconected'' and nothing happens. Am I doing something wrong? > In my controller: > MiddleMan.worker(:david_worker).async_do_work(:args => { :email => > @user.email, > :url => @user.reset_password_code, > :mail_type => :forgot_password_email }) > ------------------- > In my worker: > set_worker_name :david_worker > > def create(args = nil) > # this method is called, when worker is loaded for the first time > end > > def do_work(args) > Notifier.send("deliver_#{args[:mail_type]}", args) > end > Thanks in advance for any tips! > -- > -Grant Blakeman > grant.blakeman at gmail.com > http://grantblakeman.com > > _______________________________________________ > Backgroundrb-devel mailing list > Backgroundrb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/backgroundrb-devel >-- Let them talk of their oriental summer climes of everlasting conservatories; give me the privilege of making my own summer with my own coals. http://gnufied.org
Grant Blakeman
2008-Sep-23 01:09 UTC
[Backgroundrb-devel] Client disconected error - trying to upgrade to latest version of backgroundrb
Hi, I''ve tried it both ways (:arg & :args) and still get the same ''Client disconected'' in the debug log. I also tried simplifying the call to see if any of the arguments were the problem: MiddleMan.worker(:danny_worker).async_do_work(:arg => " grant.blakeman at gmail.com") and I still get the error. It seems like the disconnect happens before it even reads anything in the worker file. I tried calling an argument that wasn''t in the worker: MiddleMan.worker(:danny_worker).async_should_not_work(:arg => " grant.blakeman at gmail.com") and simply got the ''Client disconected'' error. Any ideas? -gb On Thu, Sep 18, 2008 at 12:22 PM, hemant <gethemant at gmail.com> wrote:> To pass arguments you use :arg not :args. > > > On Thu, Sep 18, 2008 at 11:22 PM, Grant Blakeman > <grant.blakeman at gmail.com> wrote: > > Hi, I''ve had a project using a really old version of backgroundrb (don''t > > remember which one) to simply send out some e-mails in the background. > I''m > > currently trying to upgrade the project so that I can learn more about > > backgroundrb and use some of its other features. > > I''ve tried rewriting my worker call to work with the latest version (see > > below), but every time I try it, the debug log simply prints ''Client > > disconected'' and nothing happens. Am I doing something wrong? > > In my controller: > > MiddleMan.worker(:david_worker).async_do_work(:args => { :email => > > @user.email, > > :url => @user.reset_password_code, > > :mail_type => :forgot_password_email }) > > ------------------- > > In my worker: > > set_worker_name :david_worker > > > > def create(args = nil) > > # this method is called, when worker is loaded for the first time > > end > > > > def do_work(args) > > Notifier.send("deliver_#{args[:mail_type]}", args) > > end > > Thanks in advance for any tips! > > -- > > -Grant Blakeman > > grant.blakeman at gmail.com > > http://grantblakeman.com > > > > _______________________________________________ > > Backgroundrb-devel mailing list > > Backgroundrb-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/backgroundrb-devel > > > > > > -- > Let them talk of their oriental summer climes of everlasting > conservatories; give me the privilege of making my own summer with my > own coals. > > http://gnufied.org >-- -Grant Blakeman grant.blakeman at gmail.com http://grantblakeman.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080922/7bf8efd2/attachment-0001.html>
Kieran P
2008-Sep-23 02:30 UTC
[Backgroundrb-devel] Client disconected error - trying to upgrade to latest version of backgroundrb
Hello Grant, Out of curiosity, are you using a Mac or Linux? If Mac, try downgrading the packet gem to 0.1.7. Later versions include a raise line that I found causes similar problems for me. And if Linux, try upgrading to the latest. I believe 0.1.13 contains fixes related to packet on linux..... Regards Kieran On Tue, Sep 23, 2008 at 1:09 PM, Grant Blakeman <grant.blakeman at gmail.com>wrote:> Hi, I''ve tried it both ways (:arg & :args) and still get the same ''Client > disconected'' in the debug log. I also tried simplifying the call to see if > any of the arguments were the problem: > MiddleMan.worker(:danny_worker).async_do_work(:arg => " > grant.blakeman at gmail.com") > > and I still get the error. It seems like the disconnect happens before it > even reads anything in the worker file. I tried calling an argument that > wasn''t in the worker: > > MiddleMan.worker(:danny_worker).async_should_not_work(:arg => " > grant.blakeman at gmail.com") > > and simply got the ''Client disconected'' error. > > Any ideas? > > -gb >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080923/62223bd1/attachment.html>
Grant Blakeman
2008-Sep-23 22:51 UTC
[Backgroundrb-devel] Client disconected error - trying to upgrade to latest version of backgroundrb
Hi Kieran, I''m on a Mac. I was running packet 0.1.12, so I tried downgrading to 0.1.7.But I''m still getting the same behavior: an immediate "Client disconected" in the log whenever I try to call a new worker or ask an existing one to do something. Could there be more info somewhere other than the debug log that I might be able to check and see what''s going on? -gb On Mon, Sep 22, 2008 at 8:30 PM, Kieran P <kieran776 at gmail.com> wrote:> Hello Grant, > > Out of curiosity, are you using a Mac or Linux? > > If Mac, try downgrading the packet gem to 0.1.7. Later versions include a > raise line that I found causes similar problems for me. > > And if Linux, try upgrading to the latest. I believe 0.1.13 contains fixes > related to packet on linux..... > > Regards > Kieran > > > On Tue, Sep 23, 2008 at 1:09 PM, Grant Blakeman <grant.blakeman at gmail.com>wrote: > >> Hi, I''ve tried it both ways (:arg & :args) and still get the same ''Client >> disconected'' in the debug log. I also tried simplifying the call to see if >> any of the arguments were the problem: >> MiddleMan.worker(:danny_worker).async_do_work(:arg => " >> grant.blakeman at gmail.com") >> >> and I still get the error. It seems like the disconnect happens before it >> even reads anything in the worker file. I tried calling an argument that >> wasn''t in the worker: >> >> MiddleMan.worker(:danny_worker).async_should_not_work(:arg => " >> grant.blakeman at gmail.com") >> >> and simply got the ''Client disconected'' error. >> >> Any ideas? >> >> -gb >> >-- -Grant Blakeman grant.blakeman at gmail.com http://grantblakeman.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080923/c89f7685/attachment.html>
Grant Blakeman
2008-Sep-23 23:11 UTC
[Backgroundrb-devel] Client disconected error - trying to upgrade to latest version of backgroundrb
I take it back. Downgrading the packet version does seem to have helped. It was still showing "Client disconected" in the debug log, but in my development log I can see it''s now executing the code in the worker file. Yay. Thanks for the help! -gb On Tue, Sep 23, 2008 at 4:51 PM, Grant Blakeman <grant.blakeman at gmail.com>wrote:> Hi Kieran, > I''m on a Mac. I was running packet 0.1.12, so I tried downgrading to > 0.1.7. But I''m still getting the same behavior: an immediate "Client > disconected" in the log whenever I try to call a new worker or ask an > existing one to do something. > > Could there be more info somewhere other than the debug log that I might be > able to check and see what''s going on? > > -gb > > > On Mon, Sep 22, 2008 at 8:30 PM, Kieran P <kieran776 at gmail.com> wrote: > >> Hello Grant, >> >> Out of curiosity, are you using a Mac or Linux? >> >> If Mac, try downgrading the packet gem to 0.1.7. Later versions include a >> raise line that I found causes similar problems for me. >> >> And if Linux, try upgrading to the latest. I believe 0.1.13 contains fixes >> related to packet on linux..... >> >> Regards >> Kieran >> >> >> On Tue, Sep 23, 2008 at 1:09 PM, Grant Blakeman <grant.blakeman at gmail.com >> > wrote: >> >>> Hi, I''ve tried it both ways (:arg & :args) and still get the same ''Client >>> disconected'' in the debug log. I also tried simplifying the call to see if >>> any of the arguments were the problem: >>> MiddleMan.worker(:danny_worker).async_do_work(:arg => " >>> grant.blakeman at gmail.com") >>> >>> and I still get the error. It seems like the disconnect happens before it >>> even reads anything in the worker file. I tried calling an argument that >>> wasn''t in the worker: >>> >>> MiddleMan.worker(:danny_worker).async_should_not_work(:arg => " >>> grant.blakeman at gmail.com") >>> >>> and simply got the ''Client disconected'' error. >>> >>> Any ideas? >>> >>> -gb >>> >> > > > -- > -Grant Blakeman > grant.blakeman at gmail.com > http://grantblakeman.com >-- -Grant Blakeman grant.blakeman at gmail.com http://grantblakeman.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080923/93036173/attachment-0001.html>
Chetan Sarva
2008-Sep-24 16:03 UTC
[Backgroundrb-devel] Client disconected error - trying to upgrade to latest version of backgroundrb
For the record, I see the same behaviour on linux. "Client disconnected" in debug, but workers execute successfully. I tried grepping for that string in bdrb and packet, but it''s not there or I''m looking in the wrong place... On Sep 23, 2008, at 7:11 PM, Grant Blakeman wrote:> I take it back. Downgrading the packet version does seem to have > helped. It was still showing "Client disconected" in the debug log, > but in my development log I can see it''s now executing the code in > the worker file. Yay. > > Thanks for the help! > > -gb > > On Tue, Sep 23, 2008 at 4:51 PM, Grant Blakeman <grant.blakeman at gmail.com > > wrote: > Hi Kieran, > > I''m on a Mac. I was running packet 0.1.12, so I tried downgrading to > MailScanner warning: numerical links are often malicious: 0.1.7. But > I''m still getting the same behavior: an immediate "Client > disconected" in the log whenever I try to call a new worker or ask > an existing one to do something. > > Could there be more info somewhere other than the debug log that I > might be able to check and see what''s going on? > > -gb > > > On Mon, Sep 22, 2008 at 8:30 PM, Kieran P <kieran776 at gmail.com> wrote: > Hello Grant, > > Out of curiosity, are you using a Mac or Linux? > > If Mac, try downgrading the packet gem to MailScanner warning: > numerical links are often malicious: 0.1.7. Later versions include a > raise line that I found causes similar problems for me. > > And if Linux, try upgrading to the latest. I believe 0.1.13 contains > fixes related to packet on linux..... > > Regards > Kieran > > > > On Tue, Sep 23, 2008 at 1:09 PM, Grant Blakeman <grant.blakeman at gmail.com > > wrote: > Hi, I''ve tried it both ways (:arg & :args) and still get the same > ''Client disconected'' in the debug log. I also tried simplifying the > call to see if any of the arguments were the problem: > > MiddleMan.worker(:danny_worker).async_do_work(:arg => "grant.blakeman at gmail.com > ") > > and I still get the error. It seems like the disconnect happens > before it even reads anything in the worker file. I tried calling an > argument that wasn''t in the worker: > > MiddleMan.worker(:danny_worker).async_should_not_work(:arg => "grant.blakeman at gmail.com > ") > > and simply got the ''Client disconected'' error. > > Any ideas? > > -gb > > > > -- > -Grant Blakeman > grant.blakeman at gmail.com > http://grantblakeman.com > > > > -- > -Grant Blakeman > grant.blakeman at gmail.com > http://grantblakeman.com > _______________________________________________ > Backgroundrb-devel mailing list > Backgroundrb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/backgroundrb-devel-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20080924/f639a7a0/attachment.html>
hemant
2008-Sep-24 17:02 UTC
[Backgroundrb-devel] Client disconected error - trying to upgrade to latest version of backgroundrb
That message is nothing to worry, since client usually clients and disconnects for sending a message and that message is because of that. (think some print statement is left somewhere). On Wed, Sep 24, 2008 at 9:33 PM, Chetan Sarva <csarva at operative.com> wrote:> For the record, I see the same behaviour on linux. "Client disconnected" in > debug, but workers execute successfully. I tried grepping for that string in > bdrb and packet, but it''s not there or I''m looking in the wrong place... > On Sep 23, 2008, at 7:11 PM, Grant Blakeman wrote: > > I take it back. Downgrading the packet version does seem to have helped. It > was still showing "Client disconected" in the debug log, but in my > development log I can see it''s now executing the code in the worker file. > Yay. > Thanks for the help! > -gb > > On Tue, Sep 23, 2008 at 4:51 PM, Grant Blakeman <grant.blakeman at gmail.com> > wrote: >> >> Hi Kieran, >> I''m on a Mac. I was running packet 0.1.12, so I tried downgrading to >> MailScanner has detected a possible fraud attempt from "0.1.7" claiming to >> be MailScanner warning: numerical links are often malicious: 0.1.7. But I''m >> still getting the same behavior: an immediate "Client disconected" in the >> log whenever I try to call a new worker or ask an existing one to do >> something. >> Could there be more info somewhere other than the debug log that I might >> be able to check and see what''s going on? >> -gb >> >> On Mon, Sep 22, 2008 at 8:30 PM, Kieran P <kieran776 at gmail.com> wrote: >>> >>> Hello Grant, >>> >>> Out of curiosity, are you using a Mac or Linux? >>> >>> If Mac, try downgrading the packet gem to MailScanner has detected a >>> possible fraud attempt from "0.1.7" claiming to be MailScanner warning: >>> numerical links are often malicious: 0.1.7. Later versions include a raise >>> line that I found causes similar problems for me. >>> >>> And if Linux, try upgrading to the latest. I believe 0.1.13 contains >>> fixes related to packet on linux..... >>> >>> Regards >>> Kieran >>> >>> >>> On Tue, Sep 23, 2008 at 1:09 PM, Grant Blakeman >>> <grant.blakeman at gmail.com> wrote: >>>> >>>> Hi, I''ve tried it both ways (:arg & :args) and still get the same >>>> ''Client disconected'' in the debug log. I also tried simplifying the call to >>>> see if any of the arguments were the problem: >>>> MiddleMan.worker(:danny_worker).async_do_work(:arg => >>>> "grant.blakeman at gmail.com") >>>> and I still get the error. It seems like the disconnect happens before >>>> it even reads anything in the worker file. I tried calling an argument that >>>> wasn''t in the worker: >>>> MiddleMan.worker(:danny_worker).async_should_not_work(:arg => >>>> "grant.blakeman at gmail.com") >>>> and simply got the ''Client disconected'' error. >>>> Any ideas? >>>> -gb >> >> >> -- >> -Grant Blakeman >> grant.blakeman at gmail.com >> http://grantblakeman.com > > > > -- > -Grant Blakeman > grant.blakeman at gmail.com > http://grantblakeman.com > _______________________________________________ > Backgroundrb-devel mailing list > Backgroundrb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/backgroundrb-devel > > _______________________________________________ > Backgroundrb-devel mailing list > Backgroundrb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/backgroundrb-devel >-- Let them talk of their oriental summer climes of everlasting conservatories; give me the privilege of making my own summer with my own coals. http://gnufied.org