<s> from biicode . server . conf import BII_MONGO_URI , BII_MAX_MONGO_POOL_SIZE <EOL> from biicode . common . migrations . migration_manager import MigrationManager <EOL> from biicode . server . store . migration_store import MigrationStore <EOL> from biicode . server . store . mongo_server_store import MongoServerStore <EOL> import time <EOL> from pymongo . mongo_client import MongoClient <EOL> from biicode . server . migrations . migrations import SERVER_MIGRATIONS <EOL> from biicode . common . output_stream import OutputStream <EOL> def launch ( ) : <EOL> mongo_connection = MongoClient ( BII_MONGO_URI , max_pool_size = BII_MAX_MONGO_POOL_SIZE ) <EOL> migration_store = MigrationStore ( mongo_connection ) <EOL> server_store = MongoServerStore ( mongo_connection ) <EOL> biiout = OutputStream ( ) <EOL> manager = MigrationManager ( migration_store , SERVER_MIGRATIONS , biiout ) <EOL> n1 = time . time ( ) <EOL> manager . migrate ( server_store = server_store ) <EOL> n2 = time . time ( ) <EOL> biiout . info ( '<STR_LIT>' % str ( n2 - n1 ) ) <EOL> print biiout <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> launch ( ) </s>
