openstax / accounts

OpenStax centralized authentication and accounts service
https://accounts.openstax.org
Other
15 stars 7 forks source link

Add a way to see if a user is an assignable adopter and if school is integrated #1261

Closed mwvolo closed 3 weeks ago

mwvolo commented 1 month ago

For DATA-133

mwvolo commented 1 month ago

Dante, if this is going to mess with your work to update to Ruby 3/Rails 6, it's fine to wait - not a rush.

Dantemss commented 3 weeks ago

If you are getting too many users with mismatched schools for 1 sync cycle, maybe the thing to do is combine the 2 half-hour cron tasks, ensuring the school sync always runs before the user sync.

Another option would be changing the user -> school relation to use the salesforce_id instead of the Rails id (probably make a new column in User for this if you do that). That way we wouldn't care about the state of the school sync when updating the users.

mwvolo commented 3 weeks ago

I moved the school sync to the same cron as the contact, so they run in order. Not sure if the 10-past file is still needed, or good to have around for other jobs if it's part of a deployment change.