New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SQS for active job #21406

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
7 participants
@sharmaanshul2102
Contributor

sharmaanshul2102 commented Aug 27, 2015

This is still work in progress. But before i complete it i wanna know what others think about it.

@sharmaanshul2102

This comment has been minimized.

Contributor

sharmaanshul2102 commented Aug 27, 2015

class SqsAdapter
def enqueue(job) #:nodoc:
JobWrapper.queue_as job.queue_name
ActiveSupport::JSON.encode(job.serialize)

This comment has been minimized.

@seuros

seuros Aug 27, 2015

Member

debug code ?

This comment has been minimized.

@sharmaanshul2102

sharmaanshul2102 Aug 27, 2015

Contributor

@seuros It's just some testing i was doing, but before i go ahead and complete this feature, i wanna know what others think about having Amazon SQS as adapter.

This comment has been minimized.

@sharmaanshul2102

sharmaanshul2102 Aug 27, 2015

Contributor

@seuros yup sort of.

@@ -202,6 +208,10 @@ GEM
mysql2 (0.3.19)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
nokogiri (1.6.6.2-x64-mingw32)

This comment has been minimized.

@seuros

seuros Aug 27, 2015

Member

why this was added ?

@seuros

This comment has been minimized.

Member

seuros commented Aug 27, 2015

If the adapter is 100% compatible with the others adapters, i'm 👍 to add it to Active Job 5.0.

ping @dhh

@sharmaanshul2102 sharmaanshul2102 changed the title from Added SQS for active job to Add SQS for active job Aug 27, 2015

@sharmaanshul2102

This comment has been minimized.

Contributor

sharmaanshul2102 commented Aug 27, 2015

Yes it is 100% compatible with the other adapters.

register_worker!(job)
delay = (timestamp - Time.current.to_f).round
raise 'The maximum allowed delay is 15 minutes' if delay > 15.minutes

This comment has been minimized.

@egilburg

egilburg Aug 27, 2015

Contributor

could raise ArgumentError

This comment has been minimized.

@egilburg

egilburg Aug 27, 2015

Contributor

also, perhas move 15.minutes to a constant

This comment has been minimized.

@meinac

meinac Aug 31, 2015

Contributor

Also this should be documented like this.

@senny senny added the activejob label Aug 28, 2015

@rafaelfranca

This comment has been minimized.

Member

rafaelfranca commented Sep 9, 2015

I remember I was against adding a lot of adapters inside Rails when we were discussion about Active Job. For me it should be the library authors job to maintain their Active Job adapters. I'm fine with adding some adapters by default but this is already causing maintenance burden since Active Job tests is always failing because something on the libraries.

I really believe we should stop including new adapters and encourage library author to maintain their adapters.

@dhh @jeremy what do you think?

@rafaelfranca rafaelfranca self-assigned this Sep 9, 2015

@kuldeepaggarwal

This comment has been minimized.

Contributor

kuldeepaggarwal commented Sep 10, 2015

Yes, this is also a great idea that we have different adapters with different authors to maintain it, it will distribute the responsibility. 😄

@rafaelfranca

This comment has been minimized.

Member

rafaelfranca commented Jan 28, 2016

See #23311

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment