Files
app
assets
channels
controllers
helpers
lib
mailers
models
services
views
workers
distribution_worker.rb
hub_ping_worker.rb
notification_worker.rb
thread_resolve_worker.rb
bin
config
db
lib
log
public
spec
storybook
vendor
.babelrc
.dockerignore
.env.production.sample
.eslintrc
.gitignore
.nvmrc
.rspec
.rubocop.yml
.ruby-version
.travis.yml
Dockerfile.app
Dockerfile.neo4j
Gemfile
Gemfile.lock
LICENSE
README.md
Rakefile
config.ru
docker-compose.yml
package.json
yarn.lock
hometown/app/workers/hub_ping_worker.rb
Eugen Rochko 3319473b2c Move PubSubHubbub pinging to a background worker
It can take as much as 0.5s if not longer to complete
2016-10-05 13:50:21 +02:00

10 lines
235 B
Ruby

class HubPingWorker
include Sidekiq::Worker
include RoutingHelper
def perform(account_id)
account = Account.find(account_id)
account.ping!(account_url(account, format: 'atom'), [Rails.configuration.x.hub_url])
end
end