-
Notifications
You must be signed in to change notification settings - Fork 4
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
Merge benmanns/goworker#85 #2
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mentioning the 1.4 that we'll create is based on master, as the last release is 1.3 and it's old
CHANGELOG: Stareted the CHANGELOG
This logic is ported from the Ruby. It allows each worker to heartbeat Redis so if everything is killed instead of keeping them on the DB it'll try to prun them after a while (5'). The only logic ont ported from Ruby is the one about checking the PID.
Added: Worker logic for heatbeat and prune
CHANGELOG: Bump verison 0.1.5
From the original 'github.com/benmanns/goworker' to the cycloid maintained fork
mod: Update the module definition
Otherwise it cannot be imported from the outseide
CHANGELOG: Quick release to change the module definition
When redis returns nil they return an error with an specific logic to check it with
worker: Fix issue with go-redis syntax
CHANGELOG: Bump to 0.1.7
…ss fully closed It's useful when you want to exactly know when the worker has fully stopped and cleaned. This can be useful in cases in which you have to block something until the worker is closed for example if the worker is in goroutines and the main process is killed you could end up with workers not beeing cleaned so using this function would avoid this.
goworker: Added a function 'Closed()' that will return when the process fully closed
CHANGELOG: Bumped to 0.1.8
This option is useful to automatically remove retried failed jobs from the 'failed' queue that exceede that duration, this check will be done every 1m. Also changed the 'failed.FailedAt' and added 'failed.RetriedAt' and switched them to type string. The main reason is that the Ruby lib is setting those values in an specific format and Ruby can read multiple formats into one, but GO cannot and we need to actually use the same ones or the unmarshaler does not work so I decided to switch them to 'string' and add helpers to set/get the values that will directly convert them. All the logic has more or less been ported from the Ruby version, on how to remove failed jobs and how the data is stored, as the 'MaxAgeRetries' is something unique from this GO version
This will remove workers thare could be stuck but it's not backwards compatible if enabled
Added: '-force-prune' to remove workers not on the heartbeat list
CHANGELOG: Bump version
For some reason with previous tests this was not found but now it's fixed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Copied from original pull request:
Replaced redigo client with goredis one.
@benmanns what is the significance of GetConn and PutConn ? I've removed them because of redis lib change, but they can be recovered if that's important (using https://pkg.go.dev/github.com/go-redis/redis/[email protected]#Client.Conn).
Fixes benmanns/goworker#69