Closed manuelarte closed 1 year ago
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.
@manuelarte thanks for your desire to contribute to the open source! See my comments on the design below. Great work!
👍
I updated the PR
Looks like the test is failing
Looks like the test is failing
yes. This is a problem I discovered some time ago. The miliseconds precision (the one I put by default), gives problems since the operation to lock and unlock sometimes takes quite some time. I decided to change the precision to seconds, and change the tests accordingly.
I forgot to update one part of one test
@JohnRoesler could you run the workflows again?
is something else missing?
What does this do?
Which issue(s) does this PR fix/relate to?
Adding basic gocron-gorm lock functionality. It should be described in the Readme file.
Important topic to discuss:
List any changes that modify/break current functionality
Have you included tests for your changes?
I added a test following the convention in gocron-redis-lock, I also added an extra test that checks the uniqueness of the job name + timestamp in the database.
Did you document any new/modified functionality?
example_test.go
README.md
Notes
Any feedback is appreciated.