def worker_update(context, id, filters=None, orm_worker=None, **values):
 filters = (filters or {})
 query = _worker_query(context, id=id, **filters)
 _worker_set_updated_at_field(values)
 reference = (orm_worker or models.Worker)
 values['race_preventer'] = (reference.race_preventer + 1)
 result = query.update(values)
 if (not result):
  raise exception.WorkerNotFound(id=id, **filters)
 _orm_worker_update(orm_worker, values)
 return result

def worker_update ( context , id , filters = None , orm_worker = None , ** values ) : filters = ( filters or { } ) query = _worker_query ( context , id = id , ** filters ) _worker_set_updated_at_field ( values ) reference = ( orm_worker or models . Worker ) values [ 'race_preventer' ] = ( reference . race_preventer + 1 ) result = query . update ( values ) if ( not result ) : raise exception . WorkerNotFound ( id = id , ** filters ) _orm_worker_update ( orm_worker , values ) return result
update a worker with given values .