Skip to content

Code snippet test #400

@rauhryan

Description

@rauhryan

class CachedJob < ActiveJob::Base
def perform(params)
Rails.cache.with do |dalli|
uuid = SecureRandom.uuid
if params[:cache_key] && !dalli.get(params[:cache_key])
dalli.set(params[:cache_key], uuid)
end
if dalli.get(params[:cache_key]) === uuid
message = deliver params
return if params[:suppress]
PublishWebhookJob.perform_later message if params[:webhook_publishable]
end
end
end

Please open new issues for HuBoard here
contact support@huboard.com for personal support on critical issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions