2020-01-06 20:03:03 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
|
|
|
class EventPublisher
|
|
|
|
include Wisper::Publisher
|
|
|
|
|
2020-02-10 20:01:49 +00:00
|
|
|
def announce(event, *args)
|
2020-01-06 20:03:03 +00:00
|
|
|
broadcast(event, *args)
|
|
|
|
end
|
|
|
|
|
|
|
|
def subscribe_async(listener, options = {})
|
|
|
|
subscribe(listener, options.merge(async: true))
|
|
|
|
end
|
|
|
|
end
|