# Path: pushmanager/core/db.py
# def UnsignedInteger():
# def init_db():
# def finalize_db():
# def execute_cb(query, callback_fn):
# def execute_transaction_cb(queries, callback_fn, condition=None):
# def prefix_insert_ignore(insert_ignore, compiler, **kw):
# def prefix_insert_ignore_sqlite(insert_ignore, compiler, **kw):
# class DatabaseError(Exception):
# class PushCheckList(Base):
# class PushPlans(Base):
# class PushPushContents(Base):
# class PushPushes(Base):
# class PushRemovals(Base):
# class PushRequests(Base):
# class InsertIgnore(Insert):


import subprocess
import sqlalchemy as SA
from pushmanager.core.requesthandler import RequestHandler
from pushmanager.core.settings import Settings
from pushmanager.core.util import send_people_msg_in_groups
from pushmanager.core import db
            )

            subprocess.call([
                '/nail/sys/bin/nodebot',
                '-i',
                irc_nick,
                Settings['irc']['channel'],
                irc_message
            ])
            return

        send_people_msg_in_groups(
            people,
            message,
            irc_nick,
            Settings['irc']['channel'],
            person_per_group=5,
            prefix_msg='[[pushmaster %s]]' % self.current_user
        )

    def generate_pushcontent_query(self, push_id):
        state = self.request.arguments.get('state', [None])[0]
        contents_query = ''
        if state == 'requested':
            contents_query = db.push_requests.select(
                    db.push_pushcontents.c.push == push_id
            )
        else:
            contents_query = db.push_requests.select(
                SA.and_(

# Path: pushmanager/core/db.py
# def UnsignedInteger():
# def init_db():
# def finalize_db():
# def execute_cb(query, callback_fn):
# def execute_transaction_cb(queries, callback_fn, condition=None):
# def prefix_insert_ignore(insert_ignore, compiler, **kw):
# def prefix_insert_ignore_sqlite(insert_ignore, compiler, **kw):
# class DatabaseError(Exception):
# class PushCheckList(Base):
# class PushPlans(Base):
# class PushPushContents(Base):
# class PushPushes(Base):
# class PushRemovals(Base):
# class PushRequests(Base):
# class InsertIgnore(Insert):


# Path: pushmanager/servlets/msg.py
import subprocess
import sqlalchemy as SA
from pushmanager.core.requesthandler import RequestHandler
from pushmanager.core.settings import Settings
from pushmanager.core.util import send_people_msg_in_groups
from pushmanager.core import db

            )

            subprocess.call([
                '/nail/sys/bin/nodebot',
                '-i',
                irc_nick,
                Settings['irc']['channel'],
                irc_message
            ])
            return

        send_people_msg_in_groups(
            people,
            message,
            irc_nick,
            Settings['irc']['channel'],
            person_per_group=5,
            prefix_msg='[[pushmaster %s]]' % self.current_user
        )

    def generate_pushcontent_query(self, push_id):
        state = self.request.arguments.get('state', [None])[0]
        contents_query = ''
        if state == 'requested':
            contents_query = db.push_requests.select(
                    db.push_pushcontents.c.push == push_id
            )
        else:
            contents_query = db.push_requests.select(
                SA.and_(

                    db.push_requests.c.id == db.push_pushcontents.c.request,