luigi.server module¶
Simple REST server that takes commands in a JSON payload
Interface to the Scheduler
class.
See Using the Central Scheduler for more info.
-
class
luigi.server.
cors
(*args, **kwargs)[source]¶ Bases:
luigi.task.Config
-
enabled
= BoolParameter (defaults to False): Enables CORS support.¶
-
allow_any_origin
= BoolParameter (defaults to False): Accepts requests from any origin.¶
-
allow_null_origin
= BoolParameter (defaults to False): Allows the request to set `null` value of the `Origin` header.¶
-
max_age
= IntParameter (defaults to 86400): Content of `Access-Control-Max-Age`.¶
-
allowed_methods
= Parameter (defaults to GET, OPTIONS): Content of `Access-Control-Allow-Methods`.¶
-
allowed_headers
= Parameter (defaults to Accept, Content-Type, Origin): Content of `Access-Control-Allow-Headers`.¶
-
exposed_headers
= Parameter (defaults to ): Content of `Access-Control-Expose-Headers`.¶
-
allow_credentials
= BoolParameter (defaults to False): Indicates that the actual request can include user credentials.¶
-
allowed_origins
= ListParameter (defaults to []): A list of allowed origins. Used only if `allow_any_origin` is false.¶
-
-
class
luigi.server.
RPCHandler
(*args, **kwargs)[source]¶ Bases:
tornado.web.RequestHandler
Handle remote scheduling calls using rpc.RemoteSchedulerResponder.
-
initialize
(scheduler)[source]¶ Hook for subclass initialization. Called for each request.
A dictionary passed as the third argument of a url spec will be supplied as keyword arguments to initialize().
Example:
class ProfileHandler(RequestHandler): def initialize(self, database): self.database = database def get(self, username): ... app = Application([ (r'/user/(.*)', ProfileHandler, dict(database=database)), ])
-
post
(method)¶
-
-
class
luigi.server.
BaseTaskHistoryHandler
(application, request, **kwargs)[source]¶ Bases:
tornado.web.RequestHandler
-
initialize
(scheduler)[source]¶ Hook for subclass initialization. Called for each request.
A dictionary passed as the third argument of a url spec will be supplied as keyword arguments to initialize().
Example:
class ProfileHandler(RequestHandler): def initialize(self, database): self.database = database def get(self, username): ... app = Application([ (r'/user/(.*)', ProfileHandler, dict(database=database)), ])
-
-
luigi.server.
from_utc
(utcTime, fmt=None)[source]¶ convert UTC time string to time.struct_time: change datetime.datetime to time, return time.struct_time type
-
class
luigi.server.
MetricsHandler
(application, request, **kwargs)[source]¶ Bases:
tornado.web.RequestHandler
-
initialize
(scheduler)[source]¶ Hook for subclass initialization. Called for each request.
A dictionary passed as the third argument of a url spec will be supplied as keyword arguments to initialize().
Example:
class ProfileHandler(RequestHandler): def initialize(self, database): self.database = database def get(self, username): ... app = Application([ (r'/user/(.*)', ProfileHandler, dict(database=database)), ])
-