@queue.job()
def delete_object(model, object_id):
    try:
        Model = models[model]
    except __HOLE__:
        logging.error('DeleteObject fired with missing model(name=%s)', model)
        return

    obj = Model.query.get(object_id)
    if not obj:
        logging.warning('DeleteObject fired with missing %s(id=%s)', model, object_id)
        return

    db.session.delete(obj)
dataset/ETHPy150Open getsentry/freight/freight/jobs/delete_object.py/delete_object