GithubHelp home page GithubHelp logo

Comments (8)

smartinez87 avatar smartinez87 commented on May 27, 2024

You think you can work out a Pull Request for this?

from exception_notification.

victorbueno avatar victorbueno commented on May 27, 2024

Working on it right now. =)

from exception_notification.

bragma avatar bragma commented on May 27, 2024

Any update on this? I'd like to send emails through dealyed_job.
I've checked victorbueno's repository, he patched background_notification to use delay instead of deliver. This has not been pushed into this repository and it seems that the official gem grabs from here. For my deploy I prefer using official gems.
Any solutions to this? Will the change be pulled?

from exception_notification.

emiltin avatar emiltin commented on May 27, 2024

is this working now?
can i set delayed_job as the default, or do i need to manually call exception_notification() with the relevant option?

from exception_notification.

threadhead avatar threadhead commented on May 27, 2024

+1

from exception_notification.

smartinez87 avatar smartinez87 commented on May 27, 2024

IMO, this is rather a DelayedJob issue.
ExceptionNotification is implemented according Action Mailer API.
I don't want to do a work around to make it work with other's work around. Plus it will only work with DJ if I do so, breaking it for other background job processing libraries.

from exception_notification.

moiristo avatar moiristo commented on May 27, 2024

Wouldn't it just work by wrapping the notification with an instance method?

class User < ActiveRecord::Base
  def signup!
    Notifier.signup(self).deliver
  end
end

@user.delay.signup!

or in a more generic form:

class User < ActiveRecord::Base
  def async_notify(notification)
    Notifier.send(notification, self).deliver
  end
end

@user.delay.async_notify(:signup)

from exception_notification.

smartinez87 avatar smartinez87 commented on May 27, 2024

which is why you can do

ExceptionNotifier::Notifier.delay.background_exception_notification(e)

outside, not having to change the gem's code

from exception_notification.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.