def cancel(id)
      pipeline = Base.find(id)
      pipeline.cancel
    rescue ActiveRecord::RecordNotFound
      raise InvalidPipelineError.new("Invalid pipeline")
    end
def cancel(id)
      pipeline = Base.find(id)
      pipeline.cancel
    rescue ActiveRecord::RecordNotFound
      raise InvalidPipelineError.new("Invalid pipeline")
    end
Cancels execution of a paused pipeline. Raises InvalidPipelineError if a pipeline
 can not be found with the provided <tt>id</tt>. Raises InvalidStatusError if
 pipeline is in an invalid state for cancelling (e.g. already cancelled, or
 completed)