Closed MattIPv4 closed 3 years ago
In the event we have a bad user, the rake would fail. This adds rescue logic around the save, so we are made aware of broken users but it doesn't fail. We then have a second rake to set the values for everyone.
docker-compose exec app bundle exec rake users:backfill_acceptance #<User id: 2, name: "test", email: "test@test.com", uid: -1, provider_token: "SNIP", created_at: "2020-10-07 14:45:10", updated_at: "2020-10-07 16:00:13", provider: "github", terms_acceptance: true, digitalocean_marketing_emails: false, state: "registered", receipt: nil, intel_marketing_emails: false, dev_marketing_emails: false, category: "participant", country: nil, quality_acceptance: true, disqualify_acceptance: true> #<GithubPullRequestService::UserNotFoundOnGithubError: GithubPullRequestService::UserNotFoundOnGithubError> Exit 0 docker-compose exec app bundle exec rake users:force_backfill_acceptance Exit 0
Running the rakes works.
Tested on staging, normal rake correctly handles bad users, force works cleanly too.
Description
In the event we have a bad user, the rake would fail. This adds rescue logic around the save, so we are made aware of broken users but it doesn't fail. We then have a second rake to set the values for everyone.
Test process
Running the rakes works.
Requirements to merge