Skip to content

Instantly share code, notes, and snippets.

@ijonas
Created April 12, 2018 12:57
Show Gist options
  • Save ijonas/ffdc5065d6c5f34b524bc8d3bc58cd89 to your computer and use it in GitHub Desktop.
Save ijonas/ffdc5065d6c5f34b524bc8d3bc58cd89 to your computer and use it in GitHub Desktop.
reset candidates
# DEV
account_id = 3
case_type_id = 22
bucket_id = 102
admin_user_id = 8
current_state_id = 72
# QA
account_id = 1
case_type_id = 18
bucket_id = 94
admin_user_id = 2
current_state_id = 61
BulkProcess.new(bucket_id, admin_user_id).update.documents do |doc|
result = {terms_and_conditions: 'Yes', current_state: 'Join Incomplete', current_state_id: current_state_id, candidate_opt_in:'No'}
Jobs::Reindex::ReindexTask.perform_async(account_id, case_type_id, [doc._id.to_s])
ap result
result
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment