forked from pingcap/br
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config,lightning: Implements server mode (pingcap#198)
* test: speed up TestGetJSON Force a shorter timeout on the HTTP client, so that accessing `http://not-exists` won't take 30 seconds. * config,lightning: implement "server mode" In "Server Mode" Lightning will wait for tasks submitted via the HTTP API `POST /tasks`, and will keep running until Ctrl+C. Multiple tasks are executed sequentially. The config is split into "Global config" and "Task config", which shares the same structure for compatibility and simplicity. The pprof-port setting has been deprecated in favor of status-addr, for compatibility with other tools. * lightning,config: cover some of the new code * lightning: added `GET /tasks` API to get number of queued tasks * *: addressed comments * config,lightning: use a linked hash map to store queued configs Changed /task to return JSON. This is to prepare for an API removing a queued task, and also to remove the artificial task queue size limit. * config: change TaskID to record the current timestamp
- Loading branch information
Showing
11 changed files
with
782 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.