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

Better ManagerWorker :additional_keys & :query_select_keys #20

Open
yelled3 opened this issue Jun 23, 2014 · 1 comment
Open

Better ManagerWorker :additional_keys & :query_select_keys #20

yelled3 opened this issue Jun 23, 2014 · 1 comment
Assignees

Comments

@yelled3
Copy link
Contributor

yelled3 commented Jun 23, 2014

we should split this configuration to:

  • query_select_keys
  • additional_keys - defaults to query_select_keys

this way, you can add an additional_keys which are not attributes. e.g

class User < ActiveRecord::Base
    def full_name
        "#{first_name} #{last_name}"
    end 
end
class UserSyncerWorker < Sidekiq::ActiveRecord::ManagerWorker
  sidekiq_delegate_task_to UserTaskWorker

  sidekiq_manager_options {
    :query_select_keys => [:first_name, :last_name],
    :additional_keys => [:full_name]
  }
end
@yelled3
Copy link
Contributor Author

yelled3 commented Jun 23, 2014

@seuros /cc

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

No branches or pull requests

2 participants