Skip to content

Proposed interface change to QC::Queue #249

Description

@smathieu

Currently, the QC::Queue class interface looks like:

  class Queue
    def initialize(name, top_bound=nil)
      @name = name
      @top_bound = top_bound || QC.top_bound
    end

    def conn_adapter=(a)
      @adapter = a
    end

    def conn_adapter
      @adapter ||= QC.default_conn_adapter
    end

I would like to propose that make a breaking change to it. It would become:

  class Queue
    def initialize(name, top_bound: QC.top_bound, conn_adapter: nil)
      @name = name
      @top_bound = top_bound
      @adapter = conn_adapter
    end

   # ...

The main arguments for it are that:

  1. Keyword arguments are more future proof.
  2. We currently support overriding the adapter for a queue, but it needs to be done in 2 different operations for no apparent reasons.

Thoughts?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions