def tie_app_to_servers(self, app_id, available_servers):
    try:
        with self.conn:
            cur = self.conn.cursor()
            server_id_string = ', '.join(('?' * available_servers))
            cur.execute('update servers set app_id = ? where id in ({0})'.format(server_id_string), tuple(([app_id] + available_servers)))
            return (None, 'ok')
    except Exception as er:
        return (None, ('There was a db issue: ' + str(er)))
def tie_app_to_servers(self, app_id, available_servers):
    try:
        with self.conn:
            cur = self.conn.cursor()
            server_id_string = ', '.join(('?' * available_servers))
            cur.execute('update servers set app_id = ? where id in ({0})'.format(server_id_string), tuple(([app_id] + available_servers)))
            return (None, 'ok')
    except Exception as er:
        return (None, ('There was a db issue: ' + str(er)))