You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Document or provide method to run graphile worker with Typescript tasks using bun
Motivating example
I use bun for a project, and would like to use it inside my tasks, but the instructions in the graphile worker docs only shows how to use ts-node with graphile worker (shown below)
Supporting development
I...
am interested in building this feature myself
am interested in collaborating on building this feature
am willing to help testing this feature before it's released
am willing to write a test-driven test suite for this feature (before it exists)
This is possible by running bunx --bun graphile-worker .... The --bun flag essentially replaces internal calls to node. It's a pretty simple solution. I can test it out for a couple days just to make sure it's not a totally broken way to do it, then can PR documentation for it (assuming that's ok w/ @benjie)
I think adding something to the docs saying something along the line of the following would be good 👍
While bun is not an officially supported runtime for Graphile Worker, users have reported success when executing bunx --bun graphile-worker. The --bun is necessary to ensure that child processes also run using bun rather than node.
Reacted by Severin Ibarluzea, Peter Sugihara and Nova
It works well, and cuts through a lot of the TypeScript packaging pain points. However, I am noticing memory leaks that I suspect have something to do with Bun. So, use at your own risk 😄
Activity
seveibar commentedon Jun 18, 2024
This is possible by running
bunx --bun graphile-worker .... The--bunflag essentially replaces internal calls to node. It's a pretty simple solution. I can test it out for a couple days just to make sure it's not a totally broken way to do it, then can PR documentation for it (assuming that's ok w/ @benjie)benjie commentedon Jul 1, 2024
I think adding something to the docs saying something along the line of the following would be good 👍
andrioid commentedon Jan 12, 2025
I have a
worker/index.tsfile that runs the runner from abun index.tspackage.json script.It works well, and cuts through a lot of the TypeScript packaging pain points. However, I am noticing memory leaks that I suspect have something to do with Bun. So, use at your own risk 😄