luigi.rpc module

Implementation of the REST interface between the workers and the server. implements the client side of it, implements the server side. See Using the Central Scheduler for more info.

exception luigi.rpc.RPCError(message, sub_exception=None)[source]

Bases: exceptions.Exception

class luigi.rpc.URLLibFetcher[source]

Bases: object

raises = (<class 'urllib2.URLError'>, <class 'socket.timeout'>)
fetch(full_url, body, timeout)[source]
class luigi.rpc.RequestsFetcher(session)[source]

Bases: object

fetch(full_url, body, timeout)[source]
class luigi.rpc.RemoteScheduler(url='http://localhost:8082/', connect_timeout=None)[source]

Bases: object

Scheduler proxy object. Talks to a RemoteSchedulerResponder.

add_task(*args, **kwargs)
  • add task identified by task_id if it doesn’t exist
  • if deps is not None, update dependency list
  • update status of task
  • add additional workers/stakeholders
  • update priority when needed
add_task_batcher(*args, **kwargs)
add_worker(*args, **kwargs)
announce_scheduling_failure(*args, **kwargs)
count_pending(*args, **kwargs)
dep_graph(*args, **kwargs)
disable_worker(*args, **kwargs)
fetch_error(*args, **kwargs)
forgive_failures(*args, **kwargs)
get_task_progress_percentage(*args, **kwargs)
get_task_status_message(*args, **kwargs)
get_work(*args, **kwargs)
graph(*args, **kwargs)
inverse_dep_graph(*args, **kwargs)
is_paused(*args, **kwargs)
pause(*args, **kwargs)
ping(*args, **kwargs)
prune(*args, **kwargs)
re_enable_task(*args, **kwargs)
resource_list(*args, **kwargs)

Resources usage info and their consumers (tasks).

set_task_progress_percentage(*args, **kwargs)
set_task_status_message(*args, **kwargs)
set_worker_processes(*args, **kwargs)
task_list(*args, **kwargs)

Query for a subset of tasks by status.

Query for a subset of tasks by task_id.

unpause(*args, **kwargs)
update_resource(*args, **kwargs)
update_resources(*args, **kwargs)
worker_list(*args, **kwargs)