feat: Use time_left_seconds to wait for users export job to complete#15
Open
ReubenFrankel wants to merge 2 commits into
Open
feat: Use time_left_seconds to wait for users export job to complete#15ReubenFrankel wants to merge 2 commits into
time_left_seconds to wait for users export job to complete#15ReubenFrankel wants to merge 2 commits into
Conversation
4dba3bc to
b9237df
Compare
dfcabcb to
75bf9a4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
time_left_secondsproperty seems to be present when a job has a status ofprocessing:{ "type": "users_export", "status": "processing", "format": "json", "fields": [ { "name": "user_id" }, { "name": "email" }, { "name": "email_verified" }, { "name": "username" }, { "name": "phone_number" }, { "name": "phone_verified" }, { "name": "created_at" }, { "name": "updated_at" }, { "name": "identities" }, { "name": "app_metadata" }, { "name": "user_metadata" }, { "name": "picture" }, { "name": "name" }, { "name": "nickname" }, { "name": "multifactor" }, { "name": "last_ip" }, { "name": "last_login" }, { "name": "logins_count" }, { "name": "blocked" }, { "name": "given_name" }, { "name": "family_name" }, { "name": "last_password_reset" }, { "name": "locale" } ], "percentage_done": 2, "time_left_seconds": 162, "created_at": "2022-03-21T22:42:48.637Z", "id": "job_CCBtbR1e1bp5yfcg" }We can use this value to wait in a more intelligent manner, falling back to the config
job_poll_interval_msif not present (i.e. whenqueuedorprocessing, where there is notime_left_secondsproperty).