code: def run2(job_haz, job_risk, calc_id, concurrent_tasks, pdb, loglevel,
           exports, params):
      
      hcalc = base.calculators(readinput.get_oqparam(job_haz), calc_id)
      hcalc.run(concurrent_tasks=concurrent_tasks, pdb=pdb,
                exports=exports, **params)
      hc_id = hcalc.datastore.calc_id
      rcalc_id = logs.init(level=getattr(logging, loglevel.upper()))
      oq = readinput.get_oqparam(job_risk, hc_id=hc_id)
      rcalc = base.calculators(oq, rcalc_id)
      rcalc.run(pdb=pdb, exports=exports, **params)
      return rcalc
docs: Run both hazard and risk, one after the other