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

Refactor worker implementations around a CRUD interface #14

Merged
merged 3 commits into from
Apr 16, 2016
Merged

Conversation

whitfin
Copy link
Owner

@whitfin whitfin commented Apr 15, 2016

This should be enough to cover what's needed for #6.

I defined a CRUD behaviour on all workers, and then pulled everything out which could be. The advantage is that TTL is checked in a single place only (bar take/3 in local.ex). It also cuts down on a fair amount of duplication.

I also snuck in a :hook_result option to all Worker functions which will override any results sent to the hook. I can't imagine this will be used often, but it was needed to fix #10.

This PR will also catch #10 and make it far easier to implement #11.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 4b6aeb2 on issue-6 into 9443af4 on master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling c10c22d on issue-6 into 9443af4 on master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling eefc9b1 on issue-6 into 9443af4 on master.

@whitfin whitfin merged commit 6a0f808 into master Apr 16, 2016
@whitfin whitfin deleted the issue-6 branch April 16, 2016 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expiration based deletes should register as purge actions
2 participants