OpenFn/kit

Tool to send jobs to the worker

Open

#889 opened on Mar 3, 2025

View on GitHub
 (1 comment) (0 reactions) (0 assignees)TypeScript (19 forks)auto 404
DevXgood first issue

Repository metrics

Stars
 (20 stars)
PR merge metrics
 (PR metrics pending)

Description

I would like a tool in ws-worker which:

  • allows me to specify a workflow in Javascript (with a helper API and multiline strings)
  • Maybe even lets me point to a workflow.json file, including file paths
  • (maybe we could use CLI compile to "import" a workflow .json)
  • Posts the workflow up to the worker directly

We can add dev options to the worker to make this easier. For example we may want to allow the worker to support native workflow.json format (rather than lighting's format)

What about log output? Will the worker freak out if lightning isn't attached? Maybe the tool needs to pretend to be lightning (or even start up the lightning mock), take events from the worker, and console.log them to shell or disk. That would be neat actually

I should be able to do like pnpm run path/to/workflow.{js|json} and it'll just magically do it for me

Contributor guide