Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# I am calling BackgroundRB from a test:

job_key = MiddleMan.new_worker(:class => :book_import_worker,
                               :args => {:filename => filename, 
                                         :section_id => 1})

# Then in background RB, I am trying to assign :filename value to @filename
# and :section_id to @section_id....

# What don't I grok here?  All of the following didn't work:

def do_work(filename, section_id)
  @filename = filename
  @section_id = section_id
  ....
end

def do_work(*args)
  @filename = args[0].values
  @section_id = args[1].values
  ....
end