Locks

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

Locks.

set_basic_params(count=None, thunder_lock=None, lock_engine=None)
Parameters:
set_ipcsem_params(ftok=None, persistent=None)

Sets ipcsem lock engine params.

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

Locks the specified file.

Parameters:
  • fpath (str|unicode) – File path.
  • after_setup (bool) – True - after logging/daemon setup False - before starting
  • wait (bool) – True - wait if locked False - exit if locked