search for: do_work_time

Displaying 5 results from an estimated 5 matches for "do_work_time".

2007 Jun 25
3
one more "uninitialized constant" problem
...T/lib/workers/testing_worker.rb class TestingWorker < BackgrounDRb::Worker::RailsBase def do_work(args) # This method is called in it''s own new thread when you # call new worker. args is set to :args logger.info(''TestingWorker do work'') results[:do_work_time] = Time.now_to_s results[:done_with_do_work] || = true end end And this is the code that I have in RAILS_ROOT/app/controllers/mytest2_controller.rb class Mytest2Controller < ApplicationController def new key = MiddleMan.new_worker(:class => :testing_worker) worker =...
2007 Dec 28
2
Arity?
...def create(args = nil) @successful = false @last_related_topic = nil @last_related_topic_pp4_objectid = nil @import_field_to_extended_field_map = Hash.new @attributions = Hash.new logger.info(''PastPerfect4ImporterWorker started'') @results = { :do_work_time => Time.now.to_s, :done_with_do_work => false, :records_processed => 0 } register_status(@results) end def do_work(args = nil) begin logger.debug("in worker") ... I get to the create method''s logger message, but not the first do_wo...
2006 Nov 20
2
schedule support on latest svn, a question
...+ 5.seconds %> :end: <%= Time.now + 10.minutes :repeat_interval: 1.minute Under lib/workers I have the following class: class DocumentSorterWorker < BackgrounDRb::Worker::RailsBase def do_work(args) logger.info(''DocumentSorterWorker do work'') results[:do_work_time] = Time.now.to_s results[:done_with_do_work] ||= true end end DocumentSorterWorker.register Basically does nothing but log that it''s running. After running "script/server run" this is what I have in backgroundrb_server.log: 20061120-17:04:52 (31960) port: 2000 20061120-...
2007 May 26
0
New worker not being created
...owing the example in the README of the docs. > > ./script/generate worker example > > my example worker: > > class ExampleWorker < BackgrounDRb::Worker::RailsBase > > def do_work(args) > logger.info(''ExampleWorker do work'') > results[:do_work_time] = Time.now.to_s > results[:done_with_do_work] ||= true > end > > def other_method > logger.info(''other_method in ExampleWorker called'') > results[:extra_data] = "Just a plain old string" > end > > end > ExampleWorker...
2007 May 09
0
Neophyte needs help!
...leshed it out so it looks like this (as per the example in the documentation): ##################################################################### class ExampleWorker < BackgrounDRb::Worker::RailsBase def do_work(args) logger.info(''ExampleWorker do work'') results[:do_work_time] = Time.now.to_s results[:done_with_do_work] ||= true end def other_method logger.info(''other_method in ExampleWorker called'') results[:extra_data] = "Just a plain old string" end def arg_method(arg) end end ExampleWorker.register ###############...