mewlo.mpacks.core.pack.mpackworker module

mpackpaypload.py Works with mpackmanager.py and mpack.py to support our pack/extension/addon system

class mewlo.mpacks.core.pack.mpackworker.MewloPackWorker(pack)[source]

Bases: object

The PackWorker class is the parent class for the actual 3rd party class that will be instantiated when a pack is LOADED+ENABLED.

check_isusable()[source]

This function should be implemented by derived classes. Check if this pack object is actually able to run, before startup is called. :return: None if all is good and its runable, or failure event if not. Note that elsewhere are performed checks according to whether the pack info file specifies pre-requisite required co-packd are met and enabled. Note that elsewhere we check if the database needs an update. So this function is just for more specific tests beyond those. :return: failure (or None on success)

dumps(indent=0)[source]

Return a string (with newlines and indents) that displays some debugging useful information about the object.

get_databaseversion()[source]

This is a helper function that a pack can use to persistently set (in database) the version of the current database tables in use by the pack. This is a key feature that allows a pack to tell when it needs to update its database tables, and to ensure consistency between code version and database changes between versions. The database_version is a string, typically of format ##.##.##

get_mewlosite()[source]
get_settingkey()[source]
log_event(event, request=None)[source]

Just a shortcut function to ask our mewlosite to log an event for us.

log_signalmessage(txt, receiverobject, id, message, request, source)[source]

Just a shortcut function to log a message related to a signal.

prepare(packsettings)[source]
set_databaseversion(val)[source]

This is a helper function that a pack can use to persistently set (in database) the version of the current database tables in use by the pack. This is a key feature that allows a pack to tell when it needs to update its database tables, and to ensure consistency between code version and database changes between versions. The database_version is a string, typically of format ##.##.##

shutdown()[source]

Do any shutdown stuff.

startup(mewlosite, eventlist)[source]

Do any startup stuff.

updatecheck_checkdatabase()[source]

This function should be implemented by derived classes. Check if this pack object needs to run a database update before it can be used. :return: tuple (isdatabaseupdateneeded, failure)

updaterun_database()[source]

This function should be implemented by derived classes. Run a database update. :return: tuple (didupdate, failure)

Table Of Contents

Previous topic

mewlo.mpacks.core.pack.mpackmanager module

Next topic

mewlo.mpacks.core.rbac package

This Page