z_sidejob (zotonic_core v1.0.0-rc.17)
The supervisor for websocket requests and other transient processes.
Summary
Functions
Start the Zotonic sidejob supervisor
Return the configured limit of sidejobs.
Return how many processes we can still add.
Start a sidejob. There is a limit on the number of sidejobs, so do check the return value.
Start a sidejob. There is a limit on the number of sidejobs, so do check the return value. The Context is pruned for async calls and appended to the argument list.
Start a sidejob. There is a limit on the number of sidejobs, so do check the return value.
Start a sidejob. There is a limit on the number of sidejobs, so do check the return value. The Context is pruned for async calls and appended to the argument list.
Return the amount of running processes.
Functions
-spec init() -> supervisor:startchild_ret().
Start the Zotonic sidejob supervisor
-spec limit() -> non_neg_integer().
Return the configured limit of sidejobs.
-spec space() -> integer().
Return how many processes we can still add.
-spec start(MFA) -> {ok, pid()} | {error, Reason} when MFA :: {module(), atom(), list()}, Reason :: overload.
Start a sidejob. There is a limit on the number of sidejobs, so do check the return value.
-spec start(MFA, Context) -> {ok, pid()} | {error, Reason} when MFA :: {module(), atom(), list()}, Context :: z:context(), Reason :: overload.
Start a sidejob. There is a limit on the number of sidejobs, so do check the return value. The Context is pruned for async calls and appended to the argument list.
-spec start(Module, Function, Args) -> {ok, pid()} | {error, Reason} when Module :: module(), Function :: atom(), Args :: list(), Reason :: overload.
Start a sidejob. There is a limit on the number of sidejobs, so do check the return value.
-spec start(Module, Function, Args, Context) -> {ok, pid()} | {error, Reason} when Module :: module(), Function :: atom(), Args :: list(), Context :: z:context(), Reason :: overload.
Start a sidejob. There is a limit on the number of sidejobs, so do check the return value. The Context is pruned for async calls and appended to the argument list.
-spec usage() -> non_neg_integer().
Return the amount of running processes.