def add_production_to_irradiation(self, irrad, name, params, add=True, commit=False):
    self.debug('adding production {} to irradiation={}'.format(name, irrad))
    p = os.path.join(paths.meta_root, irrad, 'productions', add_extension(name, '.json'))
    prod = Production(p, new=(not os.path.isfile(p)))
    prod.update(params)
    prod.dump()
    if add:
        self.add(p, commit=commit)
def add_production_to_irradiation(self, irrad, name, params, add=True, commit=False):
    self.debug('adding production {} to irradiation={}'.format(name, irrad))
    p = os.path.join(paths.meta_root, irrad, 'productions', add_extension(name, '.json'))
    prod = Production(p, new=(not os.path.isfile(p)))
    prod.update(params)
    prod.dump()
    if add:
        self.add(p, commit=commit)