mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-06-19 01:46:00 +08:00
[Feature] Re-try mechanism for CodePush Rollbacks (#1467)
This commit is contained in:
committed by
Alexander Goncharov
parent
ac5472ee2a
commit
693b769ba6
@@ -148,6 +148,14 @@ The `codePush` decorator accepts an "options" object that allows you to customiz
|
||||
|
||||
* __title__ *(String)* - The text used as the header of an update notification that is displayed to the end user. Defaults to `"Update available"`.
|
||||
|
||||
* __rollbackRetryOptions__ *(RollbackRetryOptions)* - An "options" object used to determine whether a rollback retry mechanism should be enabled, and if so, what settings to use. Defaults to `null`, which has the effect of disabling the retry mechanism completely. Setting this to any truthy value will enable the retry mechanism with the default settings, and passing an object to this parameter allows enabling the retry mechanism as well as overriding one or more of the default values. The rollback retry mechanism allows the application to attempt to reinstall an update that was previously rolled back (with the restrictions specified in the options).
|
||||
|
||||
The following list represents the available options and their defaults:
|
||||
|
||||
* __delayInHours__ *(Number)* - Specifies the minimum time in hours that the app will wait after the latest rollback before attempting to reinstall the same rolled-back package. Defaults to `24`.
|
||||
|
||||
* __maxRetryAttempts__ *(Number)* - Specifies the maximum number of retry attempts that the app can make before it stops trying. Cannot be less than `1`. Defaults to `1`.
|
||||
|
||||
##### codePushStatusDidChange (event hook)
|
||||
|
||||
Called when the sync process moves from one stage to another in the overall update process. The event hook is called with a status code which represents the current state, and can be any of the [`SyncStatus`](#syncstatus) values.
|
||||
|
||||
Reference in New Issue
Block a user