Example #1
0
    def run(self):
        """
            Sets up the application, runs the command, and then tears everything down
        """
        system.initialize()

        try:
            RemoteCommand.__LOGGER.debug("Starting remote command: %s", self.__command.command_key)
            AbstractDAO.begin()
            self.__command.run()
            AbstractDAO.commit()
            RemoteCommand.__LOGGER.debug("Finished remote command: %s", self.__command.command_key)
        except Exception:
            RemoteCommand.__LOGGER.exception("Error while running remote command: %s", self.__command.command_key)
            AbstractDAO.rollback()
        finally:
            system.dispose()
Example #2
0
game.take_turn()

# game = Game('player_one_temp_id_12312312')
#game.join('player_two_temp_id_234234234')

#game.deal()



# deck = Deck(64)
# board = Board(deck)

# deck.deal(2, 7)



# board.select_sphere(None, 1, 2, 3)

# print deck.cards




sys.exit()
system.initialize_database()

QueueUtil.add_command(TestCommand('Testcvdfdsfsdf'), QueueUtil.DEFAULT_QUEUE_NAME, )

system.dispose()