aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/command/serve_commands.py
Commit message (Collapse)AuthorAgeFilesLines
* Used PyCharms inspectors.Matěj Cepl2024-03-301-1/+1
|
* 2to3 conversion of the repo.Matěj Cepl2024-01-181-6/+6
|
* fix: remove legacy help textMatthew Fernandez2017-10-281-2/+0
| | | | | This should have been removed in 5fb6a912cd7cb0bcfa4512da5248baad1175faf5 as it was related to the preceding sentence that was removed.
* remove check_login from the WSGI server appMatthew Fernandez2017-10-261-10/+0
| | | | | | AuthenticationApp (just removed) was the only code that had any interaction with this functionality. That is, check_login looked for an environment variable "be-auth.user" that was only ever set by AuthenticationApp.
* remove --auth option from server commandsMatthew Fernandez2017-10-261-3/+2
| | | | | The implementation of this option contained syntax errors and did not work. For more information, see https://gitlab.com/bugseverywhere/bugseverywhere/issues/7.
* Use libbe.util.http.HTTP_USER_ERROR everywhere instead of hardcoding 418W. Trevor King2012-10-281-3/+2
|
* command:serve_*: remove wordy "with, for example" from help messageW. Trevor King2012-10-271-2/+1
|
* command:serve_commands: fix --repo -> --server in help messageW. Trevor King2012-10-271-1/+1
|
* command: use mapfiles (JSON) instead of YAML for the command serverW. Trevor King2012-10-261-5/+4
|
* doc: update :class: to :py:class: for modern Sphinx.W. Trevor King2012-10-261-3/+3
|
* Ran update-copyright.py.W. Trevor King2012-10-161-1/+1
|
* command:serve_commands: allow unspecified parameters (use defaults).W. Trevor King2012-09-031-2/+12
| | | | | | | | | | | | | | | Also raise UnknownCommand if there is no `command` key in the posted dict (malformed request). With the new code, you can run commands with: $ wget --post-data='command: list' http://localhost:8000/run/ instead of having to go through and specify all the parameters explicitly. This will make the command server more robust for use with older clients (who may not know about all the parameters that the server knows about). Parameters sent by the client that the server does not know about are silently ignored.
* command:serve-storage: rename `be serve` -> `be serve-storage`.W. Trevor King2012-08-291-2/+2
| | | | | | | | | | This will help avoid confusion between be serve-storage and be serve-commands
* libbe:util:wsgi: extract WSGI utilities into a separate module.W. Trevor King2012-08-271-182/+26
|
* command:serve_commands: remove duplicate cruft and get working unit tests.W. Trevor King2012-08-241-327/+19
|
* command:serve_commands: new command for running a command server.W. Trevor King2012-08-241-0/+679
This is an initial step towards improving BE's efficiency. Previously, BE gets slow as the bug count increases for several commands (e.g. `be list`), because it takes time to load the bugdir information from disk at each invocation. If you use a remote repo (`be --repo http://localhost:8000/ list`), the server process may have already loaded the repo from disk, but now your listing process has to fetch everything over the wire. This is even worse than loading it from disk. With the new `be serve-commands` and `be --server URL ...` pair, the bugdir loading happens once on the server, and all the processing is also carried out on the server. This means that calls like `be --server http://localhost:8000/ list` will scale much better than other methods. For example: $ time be --server http://localhost:8000/ list > /dev/null real 0m2.234s user 0m0.548s sys 0m0.114s $ time be --server http://localhost:8000/ list > /dev/null real 0m0.730s user 0m0.548s sys 0m0.112s $ time be list > /dev/null real 0m2.453s user 0m2.289s sys 0m0.166s $ time be list > /dev/null real 0m2.521s user 0m2.350s sys 0m0.172s The first call to a cold server takes about the same time as a local call, because you need to load the bugs from the filesystem. However, later calls to a warm server are 3x faster, while later local calls are still slow. This is currently a minimal working implementation. There's a good deal of code in libbe.command.serve that I'd like to abstract out into a libbe.util library (since there's still a bunch of duplication between libbe.command.serve and libbe.command.serve_commands). The remote calls are also not as fast as I'd like, likely due to library load times. This commit just locks in an initial working implementation.