joekhoobyar / shoryuken-later

A scheduling plugin using Dynamo DB for Shoryuken
GNU Lesser General Public License v3.0
24 stars 7 forks source link

Make the storage adapter configurable #7

Open phstc opened 9 years ago

phstc commented 9 years ago

Would be cool to make the storage adapter configurable to support other storages than DynamoDB such as: Redis, MongoDB, SQL etc.

Shoryuken::Later.storage_adapter = MyStorageAdapter

The storage adapter interface could respond to two methods fetch and create.

class MyStorageAdapter
  def fetch(limit = 1)
    # return an array 
  end

  def create(job)
    # persist job
  end
end

The fetch could accept a limit as SQS allows enqueuing up to 10 messages per send_message.

wdyt?

joekhoobyar commented 9 years ago

@phstc - This is a pretty cool idea, for sure.

oyeanuj commented 7 years ago

@joekhoobyar Is this still on the cards?