Skip to content
Aleksei Chernenkov edited this page Jun 21, 2022 · 3 revisions

The embedding API allows you to start Rpush within an existing process. Calling Rpush.embed will start Rpush in a thread. Rpush will attach an at_exit hook to perform a graceful shutdown. If you need to manually shutdown Rpush you can call Rpush.shutdown.

The embedding API also provides Rpush.sync for synchronizing apps (aka Hot App Updates).

WARNING! Please note that only a single instance of Rpush should ever be running per Rails environment. If you deploy multiple instances of your application and intend to start Rpush within one of those instances, you will need to ensure only a single instance spawns Rpush.

Typically you want Rpush to start along with your web server, so the best place for calling Rpush.embed would be config.ru (Rack configuration file). Placing Rpush.embed in Rails initializer or another configuration file may result in running Rpush in Rake tasks, Rails console and other processes (e.g. Sidekiq). Be careful!

Clone this wiki locally
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy