def METHOD_NAME(job, connection, type, value, _):
    import_id = job.args[0]
    ProjectImport.objects.filter(id=import_id).update(
        status=ProjectImport.Status.FAILED,
        traceback=traceback.format_exc(),
        error=str(value)
    )