Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

add custom options #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add custom options #1

wants to merge 1 commit into from

Conversation

crm114
Copy link

@crm114 crm114 commented Jul 24, 2014

No description provided.

@f3nry
Copy link

f3nry commented Jul 24, 2014

Hi there, thanks for sending a pull request!

I notice that the CI build failed on Travis, and we only accept pull requests that have passing tests. Do you think you could fix the build, and then add tests for this feature?

Additionally, could you tell us about why you need to add this feature? It may be possible to accomplish your goals without needing to change the counter cache in such a low-level way. Thanks!

@crm114
Copy link
Author

crm114 commented Jul 24, 2014

Hello,

I did not find a clear way to pass custom arguments (with Procs) to the worker so I whipped my own. If there's a way to achieve this without new code, please let me know! If not, I'll write some tests grumble grumble.

Thanks!

@f3nry
Copy link

f3nry commented Jul 25, 2014

I'm curious about why you need to pass the email into the worker? You should have relation_id in the options hash which would let you perform a lookup against the user with the counter.

@crm114
Copy link
Author

crm114 commented Jul 26, 2014

If you use scopes for a multi tenant solution in an app, you'll need to pass a tenant_id to the workers.

@f3nry
Copy link

f3nry commented Jul 28, 2014

I see, that makes sense. Let me think about this for a few days and get back to you.

Also, half those broken specs are caused by a newer version of rails and were legitimate. I fixed those on master and will release a new version of the gem. The documentation is also updated to describe how to actually run specs 😊

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants