Module: Magik::Jobs

Defined in:
lib/magik/jobs.rb

Overview

Background jobs on a Postgres-backed transactional queue (Que-style) by default, swappable to Kafka.

Implements: Phase 4 — Jobs & Async of docs/idea/00-build-spec.md.

Planned DSL surface, copied from the spec:

* `job :Name do retry; schedule :cron/:every; perform do |args| end end`
* `magik worker — horizontally scalable worker process`

Status: Not implemented — spec only. Every entry point below raises NotImplementedError. Nothing here reads config, touches a database or emits a byte of HTML.

See Also:

Constant Summary collapse

SPEC_PHASE =

The build-spec phase this subsystem implements.

Returns:

  • (String)
"Phase 4 — Jobs & Async"
DSL_SURFACE =

The DSL this subsystem will expose, verbatim from the spec.

Returns:

  • (Array<String>)
[
  "job :Name do retry; schedule :cron/:every; perform do |args| end end",
  "magik worker — horizontally scalable worker process"
].freeze
STATUS =

Implementation status of this subsystem.

Returns:

  • (String)
"Not implemented — spec only"

Class Method Summary collapse

Class Method Details

.define(*_args, **_options) ⇒ void

This method returns an undefined value.

Entry point for the Jobs DSL.

Parameters:

  • _args (Array)

    ignored

  • _options (Hash)

    ignored

Raises:

  • (NotImplementedError)

    always, until Phase 4 lands



41
42
43
# File 'lib/magik/jobs.rb', line 41

def self.define(*_args, **_options)
  raise NotImplementedError, "Magik::Jobs is spec-only; see docs/idea/00-build-spec.md"
end