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

fix(crontab): Fixed that when sending SIGINT signal, it could not be stopped properly #44

Merged
merged 1 commit into from
Dec 25, 2023

Conversation

flc1125
Copy link
Member

@flc1125 flc1125 commented Dec 25, 2023

…e stopped properly

Copy link

what-the-diff bot commented Dec 25, 2023

PR Summary

  • Updated .gitignore
    The .gitignore file, responsible for omitting certain files from tracking, now includes _example, ensuring that this file isn't unnecessarily considered in tracking updates.

  • Documentation Update in crontab/README.md
    The documentation was updated in several aspects. First, references to the fmt package were replaced with the log package, offering more appropriate messaging utilities for running programs. Second, the creation of a NewCrontabServer function has been wrapped into the kratos.New function for a more streamlined setup process. Lastly, app.Run() was added to clarify that this function needs to be called to start the applicaction.

  • Updated run function in crontab/server.go
    Changed the run function to return an error instead of void (nothing). Now, if any problem arises during the execution of this function, the error will be returned and can be handled appropriately.

  • Improved Exception Handling
    Added a return ctx.Err() inside the run function in crontab/server.go, enhancing how we handle the errors in this function.

  • Enhanced Logging in Stop Function
    Added s.log("crontab: server stopping") in the Stop function of crontab/server.go. This new log message helps identify when the server is stopping, improving the visibility of the server's lifecycle.

@flc1125 flc1125 merged commit e4b6231 into master Dec 25, 2023
4 checks passed
@flc1125 flc1125 deleted the fix-crontab-signal branch December 25, 2023 06:30
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.

1 participant