Source: https://wiki.archlinux.org/index.php/PostgreSQL
-
Install postgresql package
sudo pacman -S postgresql
-
Switch to the postgres user account and initialize the database cluster:
sudo -iu postgres
import asyncio | |
import psycopg2 | |
# dbname should be the same for the notifying process | |
conn = psycopg2.connect(host="localhost", dbname="example", user="example", password="example") | |
conn.set_isolation_level(psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT) | |
cursor = conn.cursor() | |
cursor.execute(f"LISTEN match_updates;") |
Source: https://wiki.archlinux.org/index.php/PostgreSQL
Install postgresql package
sudo pacman -S postgresql
Switch to the postgres user account and initialize the database cluster:
sudo -iu postgres
Common steps :
""" Define a data container to be used with model subclasses that emits a generic signal whenever data in the internal dictionary | |
is changed. This creates a consistent API layer with model items that can be edited programatically as dictionaries, and | |
automatically kept synchronized in the model and the view. | |
""" | |
__author__ = 'Ian Davis' | |
__all__ = ['ItemData', ] | |
from api.util.event_util import Signal |