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

Application does not stop on Panic in registered function #192

Closed
Shukla-Ankur opened this issue Apr 22, 2019 · 0 comments
Closed

Application does not stop on Panic in registered function #192

Shukla-Ankur opened this issue Apr 22, 2019 · 0 comments

Comments

@Shukla-Ankur
Copy link

I'm using AddFunc for one of my applications, which actually is a gRPC server. When the registered function panics, the application does not stop, just the goroutine which was running the function, and then the function is run as scheduled with cron.
Shouldn't the behavior of panic be honored? if the application intends to not close, then it would send an error. Why is panic being suppressed here?

robfig pushed a commit that referenced this issue Jul 3, 2019
with cross-cutting concerns

These JobWrappers are provided:
- SkipIfStillRunning skips a job if the previous invocation is still running.
- DelayIfStillRunning blocks a job invocation until the previous one is done.
- Recover, to recover from panics in the job.

BREAKING: This removes the default behavior of recovering from job panics.
That must now be opted-into using WithChain(Recover(logger)).
Having it be the default behavior can be surprising (see issue #192)
and is at odds with most libraries.

Fixes #191
Fixes #192
robfig pushed a commit that referenced this issue Jul 11, 2019
with cross-cutting concerns

These JobWrappers are provided:
- SkipIfStillRunning skips a job if the previous invocation is still running.
- DelayIfStillRunning blocks a job invocation until the previous one is done.
- Recover, to recover from panics in the job.

BREAKING: This removes the default behavior of recovering from job panics.
That must now be opted-into using WithChain(Recover(logger)).
Having it be the default behavior can be surprising (see issue #192)
and is at odds with most libraries.

Fixes #191
Fixes #192
haiheipijuan pushed a commit to haiheipijuan/cron that referenced this issue Jun 15, 2021
with cross-cutting concerns

These JobWrappers are provided:
- SkipIfStillRunning skips a job if the previous invocation is still running.
- DelayIfStillRunning blocks a job invocation until the previous one is done.
- Recover, to recover from panics in the job.

BREAKING: This removes the default behavior of recovering from job panics.
That must now be opted-into using WithChain(Recover(logger)).
Having it be the default behavior can be surprising (see issue robfig#192)
and is at odds with most libraries.

Fixes robfig#191
Fixes robfig#192
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

1 participant