breejs / bree

Bree is a Node.js and JavaScript job task scheduler with worker threads, cron, Date, and human syntax. Built for @ladjs, @forwardemail, @spamscanner, @cabinjs.
https://jobscheduler.net
MIT License
3.04k stars 79 forks source link

Can I add Dynamodb persistence using Bree? #176

Closed kunalfleethawks closed 2 years ago

kunalfleethawks commented 2 years ago

What would you like to discuss?

Is it possible to save schedules in AWS Dynamodb? If yes do I have to write my DB Adapter and what should be the template for it?

I have read the documentation but it is unclear. ...

Checklist

shadowgate15 commented 2 years ago

You could store your schedules in dynamo you would just need to write an adaptor to get the schedules from Dynamo and put them into Bree. There isn't a template for this but I do hope to, at some point, work on an adaptor for Mongo and Redis. Most likely, I would create a plugin and hook the init function to setup your logic for getting jobs from Dynamo and any other functions that would be necessary on the Bree object.

I believe there is a way to use Lambda to setup a pubsub with Dynamo but I'm not sure if/how that works.