Locks

class uwsgiconf.options.locks.Locks(*args, **kwargs)

Locks.

set_basic_params(*, count: int = None, thunder_lock: bool = None, lock_engine: str = None)
Parameters:
set_ipcsem_params(*, ftok: str = None, persistent: bool = None)

Sets ipcsem lock engine params.

Parameters:
  • ftok – Set the ipcsem key via ftok() for avoiding duplicates.
  • persistent – Do not remove ipcsem’s on shutdown.
lock_file(fpath: Union[str, pathlib.Path], *, after_setup: bool = False, wait: bool = False)

Locks the specified file.

Parameters:
  • fpath – File path.
  • after_setup – True - after logging/daemon setup False - before starting
  • wait – True - wait if locked False - exit if locked