예제 #1
0
        public override void InitDatabase(AuraDb db, BaseConf conf)
        {
            base.InitDatabase(db, conf);

            // If items end up with temp ids in the db we'd get entity ids
            // that exist twice, when creating new temps later on.
            if (ChannelServer.Instance.Database.TmpItemsExist())
            {
                Log.Warning("InitDatabase: Found items with temp entity ids.");
                // TODO: clean up dbs
            }
        }
예제 #2
0
        /// <summary>
        /// Tries to initialize database with the information from conf,
        /// exits on error.
        /// </summary>
        public virtual void InitDatabase(AuraDb db, BaseConf conf)
        {
            Log.Info("Initializing database...");

            try
            {
                db.Init(conf.Database.Host, conf.Database.User, conf.Database.Pass, conf.Database.Db);
            }
            catch (Exception ex)
            {
                Log.Error("Unable to open database connection. ({0})", ex.Message);
                CliUtil.Exit(1);
            }
        }