AdamNYC
AdamNYC

Reputation: 20425

Delayed jobs and display results in Rails

I would like to use delayed_job gem to process long queries for notification, such as: counting number of new emails, updating new members, similar to Facebook's new email notification.

I followed Ryan's railscast here. But how should I go about showing notifications once the queries completed?

Thank you.

Upvotes: 0

Views: 426

Answers (1)

Sergio Tulentsev
Sergio Tulentsev

Reputation: 230461

In background job, store its results in the database. Then later, when user logs in, show those notifications (and delete them from the database).

(I am assuming here that you're talking about notifications in a web app, not emails).

Upvotes: 1

Related Questions