Hey Keith,

Thanks for the reply. Unfortunately that doesn't seem to fix it. I ran
beanstalkd as normal:

$ ./beanstalkd
./beanstalkd: net.c:90 in unbrake: releasing the brakes

...then the worker:

$ RAILS_ENV=version_2 ./vendor/plugins/async_observer/bin/worker
#!load-rails!begin!2009-01-08T17:23:38.802707Z
RAILS_ROOT="/home/jfrankovitz/git/rails_app
#!load-rails!end!2009-01-08T17:23:42.787549Z

(I know they're communicating because when I ctrl-c beanstalkd the
worker says "Errno::ECONNREFUSED: Connection refused - connect(2)")

Then i run rake beanstalk:feed which puts a job into the queue, but
the job is never run by async_observer. I have to run my rake
beanstalk:do_job manually to get it to work. Here's another odd thing:
the speed of the queue is very unpredictable. Sometimes when i run
do_job, it takes about 10 seconds before it makes the new Model
instance; other times over 30 seconds. I just ran it now and it took
more than 3 minutes! Overall system load is very low on this box so
that's not a factor.

But anyway, back to the main problem. I'm trying this in the console
now to see more information:

$ ./script/console version_2
Loading version_2 environment (Rails 2.1.2)
>> beanstalk = Beanstalk::Pool.new(['localhost:11300'])
=> #<Beanstalk::Pool:0xb72ab810 @watch_list=["default"], @connections=
{"localhost:11300"=>#<Beanstalk::Connection:0xb72ab770 @waiting=false,
@watch_list=["default"], @socket=#<TCPSocket:0xb72ab6bc>,
@last_used="default", @addr="localhost:11300">}, @default_tube=nil,
@addrs=["localhost:11300"]>
>> beanstalk.put("Model.create( :name => 'foo' )")
=> 1
>> job = beanstalk.reserve
[ l o o o o o o n g pause here]
=> (job server=localhost:11300 id=2 size=34)
>> x = eval job.body
=> #<Model id: 14, name: "bar", creator_id: nil, updater_id: nil,
created_at: "2009-01-08 18:05:22", updated_at: "2009-01-08 18:05:22">
>> job.delete
=> true

See anything weird in the console output? Am I missing some dependency
in async_observer that is failing silently?

-Jason


On Jan 7, 9:58 pm, "Keith Rarick" <[email protected]> wrote:
> On Wed, Jan 7, 2009 at 6:07 PM, Jason F <[email protected]> wrote:
> > Then I run one worker:
>
> > [jfrankov...@irvsrddev6 rails_app]$ ./vendor/plugins/async_observer/
> > bin/worker
> > #!load-rails!begin!2009-01-08T01:51:56.127115Z
> > RAILS_ROOT="/home/jfrankovitz/git/rails_app"
> > #!load-rails!end!2009-01-08T01:52:00.683801Z
>
> Make sure your worker is running in the same environment as your
> producer. It needs to read the rails configuration to connect to
> beanstalk and the database. You probably want something like
>
> $ RAILS_ENV=version_2 ./vendor/plugins/async_observer/
> bin/worker
>
> Let us know if that helps.
>
> kr
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"beanstalk-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/beanstalk-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to