deployer package

Submodules

deployer.celery module

deployer.fleet module

deployer.fleet.get_fleet_provider()[source]

deployer.server module

deployer.server.set_current_app()[source]

deployer.util module

General utility methods

exception deployer.util.InvalidInterval(interval)[source]

Bases: exceptions.Exception

Exception corresponding to invalid time interval.

to_dict()[source]
exception deployer.util.TimeoutError[source]

Bases: exceptions.Exception

Error corresponding to timeout of a function use with @timeout annotation.

deployer.util.dict_merge(*dictionaries)[source]

Performs nested merge of multiple dictionaries. The values from dictionaries appearing first takes precendence

Parameters:dictionaries – List of dictionaries that needs to be merged.
Returns:merged dictionary

:rtype

deployer.util.function_retry(tries, delay, backoff, except_on, fn, *args, **kwargs)[source]
deployer.util.retry(tries, delay=3, backoff=2, except_on=(<type 'exceptions.Exception'>, ))[source]

Retries a function or method until it returns True. delay sets the initial delay in seconds, and backoff sets the factor by which the delay should lengthen after each failure. tries must be at least 0, and delay greater than 0.

deployer.util.timeout(seconds=10, error_message='Timer expired')[source]

Decorator that applies timeout for a dunction

Parameters:
  • seconds – Timeout in seconds. Defaults to 10s.
  • error_message – Error message corresponding to timeout.
Returns:

decorated function

deployer.util.to_milliseconds(interval)[source]

Converts string interval to milliseoncds

Parameters:interval (str) – Time interval represented in string format. (.e.g: 5s)
Returns:Interval in milliseconds
Return type:long

Module contents