Displaying 2 results from an estimated 2 matches for "pingworker".
2006 Aug 16
1
newbie needs help
...ere, but I sure
am hitting my head against the wall on this.
I''ve tried numberous of Ezra''s examples that I was able to find
online. The best I''m able to get is nothing happens and development
log says:
NoMethodError (undefined method `progress'' for #<PingWorker:0x3a786c0>):
/app/controllers/operations_controller.rb:13:in `get_progress''
Any ideas? I''m sure there''s a basic thing I''m not doing right... but
I couldn''t figure out what that might be, based on the documentation.
[mp]
2006 Aug 16
7
Forward of moderated message
...odError (You have a nil object when you didn''t expect it!
> The error occured while evaluating nil.progress):
> /app/controllers/operations_controller.rb:14:in `task_progress''
>
> Here''s the code --
>
> [ /lib/workers/ping_worker.rb ]
>
> class PingWorker < BackgrounDRb::Rails
>
> attr_accessor :progress
>
> def do_work(args)
> @progress = 0
> calculate_the_meaning_of_life(args)
> kill
> end
>
> def calculate_the_meaning_of_life(args)
> while @progress < 100
> @progress += 1
>...