toxicpoller package¶
Submodules¶
toxicpoller.cmds module¶
- toxicpoller.cmds.create(root_dir, no_token=False)[source]¶
Creates a new toxicpoller environment.
- Parameters:
--root_dir – Root directory for toxicpoller.
--no-token – Should we create a access token?
- toxicpoller.cmds.create_token(conffile, show_encrypted=False)[source]¶
Creates the access token to the master.
- Parameters:
conffile – The path for the toxicpoller.conf
--show-encrypted – Show the encrypted token?
- toxicpoller.cmds.restart(workdir, pidfile='toxicpoller.pid', loglevel='info')[source]¶
Restarts toxicpoller
The instance of toxicpoller in
workdirwill be restarted.- Parameters:
workdir – Workdir for master to be killed.
--pidfile – Name of the file to use as pidfile. Defaults to
toxicpoller.pid--loglevel – Level for logging messages.
- toxicpoller.cmds.start(workdir, daemonize=False, stdout='toxicpoller.log', stderr='toxicpoller.log', conffile=None, loglevel='info', pidfile='toxicpoller.pid')[source]¶
Starts a poller server.
- Parameters:
workdir – Work directory for the server.
--daemonize – Run as daemon. Defaults to False
--stdout – stdout path. Defaults to toxicpoller.log
--stderr – stderr path. Defaults to toxicpoller.log
--conffile (-c,) – path to config file. Defaults to None. If not conffile, will look for a file called
toxicpoller.confinsideworkdir--loglevel – Level for logging messages. Defaults to info.
--pidfile – Name of the file to use as pidfile. Defaults to
toxicpoller.pid
- toxicpoller.cmds.stop(workdir, pidfile='toxicpoller.pid', kill=False)[source]¶
Stops toxicpoller.
The instance of toxicpoller in
workdirwill be stopped.- Parameters:
workdir – Workdir for master to be killed.
--pidfile – Name of the file to use as pidfile. Defaults to
toxicpoller.pidkill – If true, send signum 9, otherwise, 15.
toxicpoller.poller module¶
- class toxicpoller.poller.Poller(repo_id, url, branches_conf, since, known_branches, vcs_type, conffile='toxicbuild.yml')[source]¶
Bases:
LoggerMixinClass to poll changes from a vcs, process them and notify about incoming changes
- async external_poll(external_url, external_name, external_branch, into)[source]¶
Fetches the changes from a external (not the origin) repository into a local branch.
- Parameters:
external_url – The url of the external remote repository.
external_name – The name to identify the external repo.
external_branch – The name of the branch in the external repo.
into – The name of the local branch.
- property lock¶
- property workdir¶
toxicpoller.server module¶
- class toxicpoller.server.PollerProtocol(loop, connection_lost_cb=None)[source]¶
Bases:
BaseToxicProtocol- async client_connected()[source]¶
Coroutine that handles connections. You must implement this in your sub-classes. When this method is called,
self.data, containing a dictionary with the data passed in the request andself.action, a string indicating which action to take are already available.
- property encrypted_token¶
The type of the None singleton.
- class toxicpoller.server.PollerServer(addr, port, loop=None, use_ssl=False, **ssl_kw)[source]¶
Bases:
ToxicServer- PROTOCOL_CLS¶
alias of
PollerProtocol