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

Handle target function exceptions in throttle_by_id #1463

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

ioreshnikov
Copy link
Contributor

Hey!

I've noticed that if a throttled function fails it's considered to be running and any subsequent calls would be cancelled. This PR fixes that by running the target function in protected mode.

@ioreshnikov
Copy link
Contributor Author

And now a bit of context: it's tangentially related to the issue I have with status buffer refresh.

I am working on a giant monorepo and for some reason the very first status refresh fails at some point after the redraw. Any subsequent status refresh is cancelled since the refresh callback is still considered to be running.

I am trying to investigate the original issue, yet the locking behaviour is preventing me from rerunning the failing code.

But aside from me personal issues, I think it's a reasonable behaviour, that the throttling mechanism resets the running flag even if the function fails.

@CKolkey CKolkey merged commit 8a60ac4 into NeogitOrg:master Aug 29, 2024
5 checks passed
@CKolkey
Copy link
Member

CKolkey commented Aug 29, 2024

Seems reasonable to me! Thanks for the patch

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

Successfully merging this pull request may close these issues.

2 participants