Use a queue for plugins #603

Closed
DamianZaremba opened this Issue Sep 12, 2012 · 0 comments

Projects

None yet

2 participants

@DamianZaremba
Contributor

The plugin interface should support using the queue. Since the events are queued it sort-of does currently, however I suggest using it explicitly.

This should allow plugin support to grow while maintaining near real time in the interface.

I also propose enabling the possibility to re-queue jobs should they fail (for a configurable amount of time).

Thoughts along the lines of;

  • Worker picks up job off the queue
  • It's the mailer plugin
  • Tries to send mail
  • Fails due to smtp server not running
  • Checks to see if the plugin allows requeuing
  • It does
  • Put job back in queue

Then either

  • Worker picks up job off the queue
  • It's the mailer plugin
  • Tries to send mail
  • Success

or

  • Worker picks up job off the queue
  • It's the mailer plugin
  • Tries to send mail
  • Fails
  • Checks time the job was submitted
  • Over configured time
  • Drops job

Clearly some things we'd never want to re-try, other things we probably do. The network stack can be a little picky and I don't think an environment issue outside of sentry should cause it to not send out notices.

We should probably have some form of weight to ensure the top of the queue doesn't get clogged with crappy jobs.

Via a mix of general uselessness and random slowness I think it's a sensible idea for the long term.

@dcramer dcramer closed this Aug 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment