aws / aws-sdk-rails

Official repository for the aws-sdk-rails gem, which integrates the AWS SDK for Ruby with Ruby on Rails.
Other
593 stars 59 forks source link

SqsActiveJob doesn't need Rails #142

Open ckhsponge opened 4 days ago

ckhsponge commented 4 days ago

Thanks for creating SqsActiveJob! I've tested it and it seems to work well.

My feature request is to split SqsActiveJob into it's own gem and remove the dependency on Rails. The ActiveJob gem does not require Rails. Lambdas can run Ruby. A lightweight Lambda could have a few gems not including Rails and be very effective at background job processing.

I've tested the project after removing 3 Rails references:

  1. Logger - A Rails logger is used. To fix this, check if Rails exists. If not, then use the standard Logger instead of the Rails logger.
  2. Config - A configuration file existence is checked in the Rails root. Don't look for this file if Rails doesn't exist.
  3. Polling - The Rails environment is loaded before polling. Don't do this. Instead start whatever environment is appropriate and then initiate polling.

I'd be happy to split this project out myself however not maintaining it in 2 places would be better.

mullermp commented 4 days ago

Interesting. I had a dream (or nightmare) last night about splitting out features of aws-sdk-rails into separate gems. I originally made that decision some years ago to drive usage and make maintenance easier but it's actually been the opposite. I think it would be backwards compatible to pull it out, have the lastest aws-sdk-rails depend on it, and maintain multiple gems in the aws-sdk-rails repo. If you'd like to share that work, we can track it here, but no guarantees on timeline. @alextwoods @jterapin thoughts?

ckhsponge commented 3 days ago

I like that I idea. I can try to get a PR put together.