def colliding_locks
      task_ids = task.self_and_parents.map(&:id)
      colliding_locks_scope = Lock.active.where(Lock.arel_table[:task_id].not_in(task_ids))
      colliding_locks_scope = colliding_locks_scope.where(name:          name,
                                                          resource_id:   resource_id,
                                                          resource_type: resource_type)
      unless exclusive?
        colliding_locks_scope = colliding_locks_scope.where(:exclusive => true)
      end
      colliding_locks_scope
    end
def colliding_locks
      task_ids = task.self_and_parents.map(&:id)
      colliding_locks_scope = Lock.active.where(Lock.arel_table[:task_id].not_in(task_ids))
      colliding_locks_scope = colliding_locks_scope.where(name:          name,
                                                          resource_id:   resource_id,
                                                          resource_type: resource_type)
      unless exclusive?
        colliding_locks_scope = colliding_locks_scope.where(:exclusive => true)
      end
      colliding_locks_scope
    end
returns a scope of the locks colliding with this one