* Bug 1628885: Use subprocess rather than multiprocessing for ping uploading
This avoids a number of features that are tricky on Windows, such as
duplicating file handles to a spawned subprocess.
* Address comments in the PR
* Lint
* Add CHANGELOG
* Bug 1628310: Don't raise HTTPException or socket.gaierror
These exceptions occur when the network is down, the URL doesn't resolve,
and a bunch of other things. If any of these fail, we should just log and return
False so the ping uploader can move on to other pings or try again next time.
This is preferable to displaying a long (but ultimately harmless) traceback.
* debug -> error
* Update glean-core/python/tests/test_network.py
Co-Authored-By: Alessio Placitelli <alessio.placitelli@gmail.com>
* Add CHANGELOG
Co-authored-by: Alessio Placitelli <alessio.placitelli@gmail.com>
* Bug 1626086: Wait for tasks to complete before shutting down
* lint
* Add comment
* Add documentation about Python parallelism
* Do ping uploading in a separate process
* Fix test on Windows
* Refactor to reduce duplication
* Make multiprocessing optional
* Update docs/user/adding-glean-to-your-project.md
Co-Authored-By: William Lachance <wrlach@gmail.com>
* Update docs/user/adding-glean-to-your-project.md
Co-Authored-By: William Lachance <wrlach@gmail.com>
* Make it clear in the CHANGELOG that multiprocessing is optional
* Rename methods
* spellcheck
Co-authored-by: William Lachance <wrlach@gmail.com>
* 1624695: Act on changes in upload enable state outside of application
* BUGFIX: iOS don't send metrics ping imm. on last day of the month
Co-authored-by: Travis Long <tlong@mozilla.com>
* 1604191: Python: run Glean work on a worker thread
* Implement tests
* Add another test
* Apply suggestions from code review
Co-Authored-By: William Lachance <wrlach@gmail.com>
* Convert docstring to comment
* Add docs about parallelism
* lint
* Remove unnecessary layer of indirection
Co-authored-by: William Lachance <wrlach@gmail.com>
* 1557048: Add reason codes to the metrics ping
This adds support for sending reason codes along with pings. The reason codes
are defined as an enumeration in the pings.yaml file, and only these values
are allowed on specific pings.
Additionally, this builds on that to add reason codes to the metrics ping.
* Use short form for enums
* Suppress compiler warning
* swiftlint
* NoReasonCodes -> NoExtraKeys
* Fix descriptions