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

(Cancel running functions) This method disable #1276

Open
ethanshi0884 opened this issue Apr 14, 2024 · 3 comments
Open

(Cancel running functions) This method disable #1276

ethanshi0884 opened this issue Apr 14, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@ethanshi0884
Copy link

Describe the bug
(Cancel running functions) This method disable.
inngest.createFunction(
{
id: "sync-contacts",
cancelOn: [{ event: "app/user.deleted", match: "data.userId" }],
}
// ...
);

didn't cancel at the time that needed to cancel.

When I run it on my own computer, this method is valid and can be canceled, but when I run it in the production environment, it cannot run. Moreover, this function ran normally in the production environment yesterday, but it cannot be canceled starting today. No matter how I modify it, it doesn't work

@ethanshi0884 ethanshi0884 added the bug Something isn't working label Apr 14, 2024
Copy link

linear bot commented Apr 14, 2024

@jasonroelofs
Copy link

Adding my experiences here, cancellation doesn't seem to work on the hosted version of the app. Locally with the development container version, cancellation works great, but I cannot get it to work properly in production. I've tried both:

      cancelOn: [
        {
          event: 'deployment/cancelled',
          if: 'async.data.deployId == event.data.deployId',
        },
      ],

and

      cancelOn: [
        {
          event: 'deployment/cancelled',
          match: 'data.deployId',
        },
      ],

I can see the event showing up in my account just fine but the function continues executing.

@jasonroelofs
Copy link

An update from my side, turns out I didn't know you needed to re-sync the app when workflow changes are deployed. When I re-sync'd the cancellation event now maps properly to the workflow in question, and cancellation works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants