Module: Sidekiq::Portal::Job::Builder Private

Defined in:
lib/portal/job/builder.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0

Class Method Summary collapse

Class Method Details

.build(klass, initial_time:, cron_pattern:, every_pattern:, timezone:) ⇒ Sidekiq::Portal::Job

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Options Hash (klass):

  • (Class)

Options Hash (initial_time:):

  • (Time)

Options Hash (cron_pattern:):

  • (String, NilClass)

Options Hash (every_pattern:):

  • (String, NilClass)

Options Hash (timezone:):

  • (String)

Since:

  • 0.1.0



16
17
18
19
20
21
22
23
24
25
# File 'lib/portal/job/builder.rb', line 16

def build(klass, initial_time:, cron_pattern:, every_pattern:, timezone:)
  timeline = Sidekiq::Portal::Timeline::Builder.build(
    initial_time,
    cron_pattern,
    every_pattern,
    timezone
  )

  Sidekiq::Portal::Job.new(klass, timeline)
end