Actions

class uwsgiconf.options.main_process_actions.HookAction(*args)
class uwsgiconf.options.main_process_actions.ActionMount(mountpoint, fs=None, src=None, flags=None)

Mount or unmount filesystems.

Examples:
  • Mount: proc none /proc
  • Unmount: /proc
Parameters:
  • mountpoint (str|unicode) –
  • fs (str|unicode) – Filesystem. Presence indicates mounting.
  • src (str|unicode) – Presence indicates mounting.
  • flags (str|unicode|list) – Flags available for the operating system. As an example on Linux you will options like: bind, recursive, readonly, rec, detach etc.
class uwsgiconf.options.main_process_actions.ActionExecute(command)

Run the shell command.

Command run under /bin/sh. If for some reason you do not want to use /bin/sh, use binsh option,

Examples:
  • cat /proc/self/mounts
class uwsgiconf.options.main_process_actions.ActionCall(target, honour_exit_status=False, arg_int=False)

Call functions in the current process address space.

Parameters:
  • target (str|unicode) – Symbol and args.
  • honour_exit_status (bool) – Expect an int return. Anything != 0 means failure.
  • arg_int (bool) – Parse the argument as an int.
class uwsgiconf.options.main_process_actions.ActionDirChange(target_dir)

Changes a directory.

Convenience action, same as call:chdir <directory>.

class uwsgiconf.options.main_process_actions.ActionDirCreate(target_dir)

Creates a directory with 0777.

class uwsgiconf.options.main_process_actions.ActionFileCreate(fpath)

Creates a directory with 0666.

class uwsgiconf.options.main_process_actions.ActionExit(status_code=None)

Exits.

Convenience action, same as callint:exit [num].

class uwsgiconf.options.main_process_actions.ActionPrintout(text=None)

Prints.

Convenience action, same as calling the uwsgi_log symbol.

class uwsgiconf.options.main_process_actions.ActionSetHostName(name)

Sets a host name.

class uwsgiconf.options.main_process_actions.ActionAlarm(alarm, message)

Issues an alarm. See .alarms options group.

class uwsgiconf.options.main_process_actions.ActionFileWrite(target, text, append=False, newline=False)

Writes a string to the specified file.

If file doesn’t exist it will be created.

Note

Since 1.9.21

Parameters:
  • target (str|unicode) – File to write to.
  • text (str|unicode) – Text to write into file.
  • append (bool) – Append text instead of rewrite.
  • newline (bool) – Add a newline at the end.
class uwsgiconf.options.main_process_actions.ActionFifoWrite(target, text, wait=False)

Writes a string to the specified FIFO (see fifo_file from master_process params).

Parameters:wait (bool) – Wait until FIFO is available.

Unlink the specified file.

Note

Since 1.9.21