mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
cb6a383b28
When Mach captures an exception, it checks if any Python files were modified, then sends the error to Sentry if not. This filters out local development errors from our Sentry dashboard. However, asking VCS if "any Python files are changed" can be a long operation (in the magnitude of ~1s-10s). This patch moves that processing to a separate thread that starts during Mach initialization, so that the answer will be ready by the time an exception is raised. I would've preferred if there was a better abstraction for handling this, but: * A ThreadExecutor seemed like overkill (until it becomes Mach-wide) * I don't know of any standard library tools that provide a "single-thread-future-with-result" sort of mechanism. Differential Revision: https://phabricator.services.mozilla.com/D127157 |
||
---|---|---|
.. | ||
docs | ||
mach | ||
bash-completion.sh | ||
metrics.yaml | ||
pings.yaml | ||
README.rst | ||
setup.cfg | ||
setup.py |
==== mach ==== Mach (German for *do*) is a generic command dispatcher for the command line. To use mach, you install the mach core (a Python package), create an executable *driver* script (named whatever you want), and write mach commands. When the *driver* is executed, mach dispatches to the requested command handler automatically. To learn more, read the docs in ``docs/``.