We’re building a new customer-facing portal and will be getting spreadsheets of email addresses and names from customers. We’ll be copy-pasting columns of users from those spreadsheets into CSV files that will then be fed to a tool I’ve built that builds the appropriate JSON document and sends it to /api/v2/jobs/users-imports. We then poll the job until it completes so that the users exist when we perform some follow-up tasks like sending out password reset emails to allow the users to create their passwords.
We’ve found that at some times of day (eg, 00:00 through 06:00 UTC) the user import jobs typically take over 20 minutes to complete, but at others (eg, 09:00 UTC) they only take a few seconds. These time frames are consistent whether the import job is for 1 user or 100. Unfortunately, the office hours of the staff that are likely to be running the user imports are during the slow window and those staff are our tech support team and are very unlikely to be able to sit for 20+ minutes until they can perform the follow-up tasks because the support requests will keep coming in during that time. As a result, we’re likely to end up with batches of users that get created but not followed up.
So… why are these small jobs taking so long to run? Would they finish sooner if we weren’t on the free tier? Should we just be posting individual users to /api/v2/users to create them synchronously and skip the jobs queue?