← Back to team overview

openerp-connector-community team mailing list archive

Help me understand jobs and backend ids

 

Hello,

I have trouble understanding the whole passing of the backend_id to jobs.
Jobs of course need context, or an environment, to run in.
Typical code I found:

    product = session.browse(model_name, record_id)
    backend_id = product.backend_id.id
    env = get_environment(session, model_name, backend_id)

Now, does this mean the product model is extended with a many2one
backend_id? Does this mean the backend_id in the product should be
set to a specific backend before forking the job? This would be troublesome
when multiple connectors are in use concurrently

I do not understand how this is supposed to work. Can someone
enlighten me?

Thanks,
Ron Arts

Follow ups