Class: CollavreLinear::InboundApplyJob

Inherits:
ApplicationJob
  • Object
show all
Defined in:
app/jobs/collavre_linear/inbound_apply_job.rb

Overview

Applies a verified inbound Linear webhook payload to local state.

Usage:

CollavreLinear::InboundApplyJob.perform_later(payload)

Signature verification, timestamp/replay checks, and echo suppression all happen in WebhooksController BEFORE this job is enqueued. By the time we run, the payload is trusted.

The heavy lifting lives in CollavreLinear::InboundApplier (Task 10). Until that constant exists, this job no-ops gracefully so the webhook pipeline can ship and be validated independently.

Instance Method Summary collapse

Instance Method Details

#perform(payload) ⇒ Object



25
26
27
28
29
30
31
32
33
34
# File 'app/jobs/collavre_linear/inbound_apply_job.rb', line 25

def perform(payload)
  unless CollavreLinear.const_defined?(:InboundApplier)
    Rails.logger.info(
      "[CollavreLinear::InboundApplyJob] InboundApplier not defined yet; skipping"
    )
    return
  end

  CollavreLinear::InboundApplier.new(payload).apply!
end