ruby on rails - How to notify an API user once a process has been finished? -


i have api users can create, call, orders.

i enqueue orders , process them via sidekiq gem. when process done, send email user. however, looking on how notify him programatically.

so, sending user post request particular endpoint, telling him order has been processed.

i wondering kind of security or other technical things should take account when doing this, or if there kind of gem me on developing this.

you can check pub/sub pattern this...

when sidekiq finish processing publish event... , register browser listen event... better sending user post request particular endpoint, telling him order has been processed.

there many libraries out there can implementing pub/sub pattern check following...

please note have use rails app publisher , front end subscriber ( can check equivalent libs js )

and if interested in implementing pub/sub within same rails app... i've looked lot , found working solutions ( app publish , listen published events without getting locked in process )

this post on how use gems implement pub/sub pattern


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -