Skip to content

Conversation

@hiranya911
Copy link
Contributor

Related to #71.

A new 'httpTimeout' option is introduced which will be used to control the timeout of all outbound requests made by the db module. In the future, we can use the same in other modules too.

firebase_admin.initialize_app(credential, { 'databaseURL' : test_url, 'httpTimeout': 60 # timeout in seconds }) 
auth_override: A dictionary representing auth variable overrides or None (optional).
Default value provides admin privileges. A None value here provides un-authenticated
guest privileges.
timeout: HTTP request timeout in seconds (optional).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the behavior if one isn't specified?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case we don't set any timeout on the connection, which activates the defaults of the requests library. However, their default is essentially "never timeout". Would it be better to default to something like 60 seconds instead?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should document the default behavior. If the old behavior was "never timeout" we should probably leave it be, in case anybody depended on it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@hiranya911 hiranya911 removed their assignment Sep 19, 2017
@hiranya911 hiranya911 assigned hiranya911 and unassigned bjornick Sep 20, 2017
@hiranya911 hiranya911 merged commit 2801483 into master Sep 20, 2017
@hiranya911 hiranya911 deleted the hkj-http-timeout branch September 20, 2017 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants