Git#
Server#
- class GitBaseHandler(application: grader_service.server.GraderServer, request: tornado.httputil.HTTPServerRequest, **kwargs: Any)[source]#
Bases:
grader_service.handlers.base_handler.GraderBaseHandler- async data_received(chunk: bytes)[source]#
Implement this method to handle streamed request data.
Requires the .stream_request_body decorator.
May be a coroutine for flow control.
- hub_api_base_path: str#
- on_finish()[source]#
Called after the end of a request.
Override this method to perform cleanup, logging, etc. This method is a counterpart to prepare.
on_finishmay not produce any output, as it is called after the response has been sent to the client.
- write_error(status_code: int, **kwargs) None[source]#
Override to implement custom error pages.
write_errormay call write, render, set_header, etc to produce output as usual.If this error was caused by an uncaught exception (including HTTPError), an
exc_infotriple will be available askwargs["exc_info"]. Note that this exception may not be the “current” exception for purposes of methods likesys.exc_info()ortraceback.format_exc.
- class InfoRefsHandler(application: grader_service.server.GraderServer, request: tornado.httputil.HTTPServerRequest, **kwargs: Any)[source]#
Bases:
grader_service.handlers.git.server.GitBaseHandlerRequest handler for info/refs
Use this handler to handle example.git/info/refs?service= URLs
- hub_api_base_path: str#
- async prepare()[source]#
Called at the beginning of a request before get/post/etc.
Override this method to perform common initialization regardless of the request method.
Asynchronous support: Use
async defor decorate this method with .gen.coroutine to make it asynchronous. If this method returns anAwaitableexecution will not proceed until theAwaitableis done.New in version 3.1: Asynchronous support.
- class RPCHandler(application: grader_service.server.GraderServer, request: tornado.httputil.HTTPServerRequest, **kwargs: Any)[source]#
Bases:
grader_service.handlers.git.server.GitBaseHandlerRequest handler for RPC calls
Use this handler to handle example.git/git-upload-pack and example.git/git-receive-pack URLs
- hub_api_base_path: str#
- async prepare()[source]#
Called at the beginning of a request before get/post/etc.
Override this method to perform common initialization regardless of the request method.
Asynchronous support: Use
async defor decorate this method with .gen.coroutine to make it asynchronous. If this method returns anAwaitableexecution will not proceed until theAwaitableis done.New in version 3.1: Asynchronous support.