Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use bun as a task executor #477

Open
4 of 6 tasks
seveibar opened this issue Jun 18, 2024 · 2 comments
Open
4 of 6 tasks

Use bun as a task executor #477

seveibar opened this issue Jun 18, 2024 · 2 comments

Comments

@seveibar
Copy link

seveibar commented Jun 18, 2024

Feature description

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)

image

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)
  • am a Graphile sponsor ❤️
  • have an active support or consultancy contract with Graphile
@seveibar
Copy link
Author

seveibar commented Jun 18, 2024

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)

image

@benjie
Copy link
Member

benjie commented Jul 1, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants