Skip to content

Conversation

ReubenFrankel
Copy link
Collaborator

@ReubenFrankel ReubenFrankel commented Feb 8, 2024

The time_left_seconds property seems to be present when a job has a status of processing:

{
  "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_ms if not present (i.e. when queued or processing, where there is no time_left_seconds property).

@ReubenFrankel ReubenFrankel added the enhancement New feature or request label Feb 8, 2024
@ReubenFrankel ReubenFrankel force-pushed the feature/users-export-job-time-left-seconds branch 2 times, most recently from 4dba3bc to b9237df Compare March 7, 2024 00:51
@ReubenFrankel ReubenFrankel self-assigned this Mar 7, 2024
@ReubenFrankel ReubenFrankel force-pushed the feature/users-export-job-time-left-seconds branch from dfcabcb to 75bf9a4 Compare October 15, 2024 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant