Evaluate how to handle Sidekiq/background jobs when transferring/migrating groups and users

Summary

When transferring a top-level group or users to an Organization, or when migrating to another cell, we need to evaluate the effects on Sidekiq jobs.

  • Do we need to ensure all jobs are complete before taking these actions?
  • Will jobs handle the move gracefully?

Problem Statement

Organization transfers and cell migrations involve moving data and changing organizational boundaries, which could impact:

  1. Active Sidekiq jobs that reference entities being transferred
  2. Scheduled jobs that may execute after the transfer is complete
  3. Retry jobs that may fail due to changed organizational context
  4. Queued jobs waiting to be processed during the transfer