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

Added PanicHandler #335

Merged
merged 7 commits into from Jun 6, 2022
Merged

Added PanicHandler #335

merged 7 commits into from Jun 6, 2022

Conversation

fenisteel
Copy link

What does this do?

Add global PanicHandler capability

Which issue(s) does this PR fix/relate to?

Resolves #332

List any changes that modify/break current functionality

None.

Have you included tests for your changes?

Yes.

Did you document any new/modified functionality?

Only in the source code.

gocron.go Outdated Show resolved Hide resolved
executor_test.go Outdated
fmt.Println("PanicHandler calld:")
fmt.Println("panic in " + jobName)
fmt.Println(recoverData)
panicHandled = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we run tests with the -race flag on, so it's complaining that you reference panicHandled in the main goroutine and then inside the func here. Could you add a mutex for it and lock/unlock here as well as line 63?

gocron.go Outdated Show resolved Hide resolved
executor_test.go Outdated Show resolved Hide resolved
executor_test.go Outdated Show resolved Hide resolved
@JohnRoesler JohnRoesler merged commit f294b9b into go-co-op:main Jun 6, 2022
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.

None yet

2 participants