OpenFn / OpenFn/kit

ws-worker: cancel a job when it gets a kill signal from lightning

Open
#408 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

more details needed
Dominant language
TypeScript
Stars
21
Forks
23
Avg merge
1d 22h
Merged PRs (30d)
17

Description

One day lightning might send a kill message to the attempt channel. This is eg if lightning times out the attempt, or the user manually cancelled it.

The worker should support like an attempt:cancel message on the socket and stop executing ASAP, then gracefully close the channel.

It needs support in the engine to do this nicely (although I suppose it could just close the channel and ignore the engine, let it waste a few cycles)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the ws-worker socket handling and follow how attempt messages reach the engine, then inspect the engine's existing cancellation or shutdown path. Support an attempt:cancel message from lightning, stop execution promptly, and gracefully close the channel; verify the worker does not continue processing after cancellation.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.