Open lintfail opened 2 months ago
@Josh-Walker-GM / @thedavidprice Any thoughts on adding some documentation around this? I'm happy to contribute if there's a preferred way to achieve this
Hi @lintfail!
It's a totally reasonable request. I can certainly imagine wanting to run tasks outside of node either because a different language allows the functionality to be implemented more ergonomically or simply because of different library support. I think we'd be happy to have an example on the docs highlighting that this is possible and a description of how to achieve this.
In my head to perform jobs outside of the current redwood worker you'd need your python worker to understand that:
It's been a while since I've worked in python so I wouldn't be swift in implementing an example. Is that something you'd be interested in doing? Implementing a python worker that processes jobs using the database backed jobs? I think a minimal working example would be the next step and then from that we could update the docs to describe what was needed to implement that and indeed point to it as an example. Does that sound reasonable?
Summary and description
I'd assume it's a fairly common pattern to have the "web/api" portion of the app written in redwoodjs and have background processing done in python (eg: for AI workloads).
At the moment, we possibly could expose a HTTP endpoint that can be hit + waited on by a redwoodjs worker, but it would be great to have a way to have python workers consume and finish jobs scheduled within redwoodjs.
Are you interested in working on this?