cartodb-4.42/lib/carto/tracking/services/pubsub.rb

20 lines
450 B
Ruby
Raw Normal View History

2024-04-06 13:25:13 +08:00
module Carto
module Tracking
module Services
module PubSub
def report_to_pubsub
return unless pubsub_topic
supplied_properties = @format.to_pubsub
Resque.enqueue(Resque::TrackingJobs::SendPubSubEvent, @reporter.try(:id), pubsub_name, supplied_properties)
end
def pubsub_topic
@pubsub_topic ||= Cartodb.get_config(:pubsub, 'topic')
end
end
end
end
end