pyplanet.god

Error

This package is strictly private and should not be changed inside of one of your apps/customizations!

class pyplanet.god.pool.EnvironmentPool(pool_names, max_restarts=0, options=None)[source]

This class manages the pool instances for the current environment/installation.

Warning

You should not have to use this class in any moment!

populate()[source]

Populate the pool instance processes, (prepares the processes).

restart(name=None)[source]

Restart single process, or all if no name is given.

Parameters:name – Name or none for all pools.
shutdown()[source]

Shutdown all processes.

start()[source]

Start all processes.

watchdog()[source]

Watch all the processes. (Blocking method!).

class pyplanet.god.process.InstanceProcess(queue, environment_name='default', pool=None, options=None)[source]

The InstanceProcess is the encapsulation around the real controller instance.

Warning

This code is still being executed at the main process!!

did_die

Boolean determinating if the process did die.

exitcode

Exit code of process.

Returns:Exit code.
is_alive()[source]

Call process method is_alive()

shutdown()[source]

Shutdown (terminate) process.

start()[source]

Start the process.

will_restart

Boolean: Is the process able to restart (not reached max_restarts).