I have a sidekiq worker that connects to a remote odbc database, fetches the data and then update the local database. Now I'm splitting the worker into two workers. One will connect and fetch the data and another will update the records.
The connection returns an object #<OCI8::Cursor:0x00000007703f30>
that I'm passing in parameters to the second worker.
SecondWorker.perform_async({:odbc => connection})
In the second worker I tried to use it:
def perform(options)
order_odbc = options['odbc']
end
But it treats the object as string
"#<OCI8::Cursor:0x00000006bddf48>":String
Is there any other way to pass the objects in parameters?