Module: Sqewer

Defined in:
lib/sqewer.rb,
lib/sqewer/version.rb,
lib/sqewer/resubmit.rb,
lib/sqewer/extensions/railtie.rb,
lib/sqewer/extensions/appsignal_wrapper.rb

Overview

The enclosing module for the library

Defined Under Namespace

Modules: CLI, Contrib, NullLogger, SimpleJob Classes: AtomicCounter, Connection, ConnectionMessagebox, Error, ExecutionContext, LocalConnection, MiddlewareStack, Railtie, Resubmit, Serializer, StateLock, Submitter, Worker

Constant Summary collapse

VERSION =
'10.0.0'

Class Method Summary collapse

Class Method Details

.clientObject

Returns a singleton of Aws::SQS::Client



15
16
17
# File 'lib/sqewer.rb', line 15

def self.client
  Sqewer::Connection.client
end

.require_extension(extension_name) ⇒ Object

Loads a particular Sqewer extension that is not loaded automatically during the gem require.

Parameters:

  • extension_name (String)

    the name of the extension to load (like active_job_adapter)



23
24
25
26
# File 'lib/sqewer.rb', line 23

def self.require_extension(extension_name)
  path = File.join("sqewer", "extensions", extension_name)
  require_relative path
end

.submit!(*jobs, **options) ⇒ Object

Shortcut access to Submitter#submit.

See Also:

  • {Sqewer{Sqewer::Submitter{Sqewer::Submitter#submit!}


31
32
33
# File 'lib/sqewer.rb', line 31

def self.submit!(*jobs, **options)
  Sqewer::Submitter.default.submit!(*jobs, **options)
end