shoryuken-later
shoryuken-later copied to clipboard
Make the storage adapter configurable
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?
@phstc - This is a pretty cool idea, for sure.
@joekhoobyar Is this still on the cards?