public void Awake() { //DBConfig config = StartConfigComponent.Instance.StartConfig.GetComponent<DBConfig>(); //string connectionString = config.ConnectionString; StartConfig dbStartConfig = StartConfigComponent.Instance.DBConfig; CacheConfig cacheConfig = dbStartConfig.GetComponent <CacheConfig>(); if (cacheConfig == null) { redisClient = ConnectionMultiplexer.Connect(connectionString); } else { redisClient = ConnectionMultiplexer.Connect(cacheConfig.ConnectionString); } database = redisClient.GetDatabase(); CollectCacheAttribute(); ClearAllKey(); for (int i = 0; i < taskCount; ++i) { DBTaskQueue taskQueue = ComponentFactory.Create <DBTaskQueue>(); this.tasks.Add(taskQueue); } }
public void Awake() { for (int i = 0; i < taskCount; ++i) { DBTaskQueue taskQueue = ComponentFactory.Create <DBTaskQueue>(); this.tasks.Add(taskQueue); } }
public void Awake() { BuildConnection(); BuildDBSchema(); for (int i = 0; i < taskCount; ++i) { DBTaskQueue taskQueue = ComponentFactory.Create <DBTaskQueue>(); this.tasks.Add(taskQueue); } }
public void Awake() { DBConfig config = StartConfigComponent.Instance.StartConfig.GetComponent <DBConfig>(); string connectionString = config.ConnectionString; mongoClient = new MongoClient(connectionString); this.database = this.mongoClient.GetDatabase(config.DBName); for (int i = 0; i < taskCount; ++i) { DBTaskQueue taskQueue = ComponentFactory.Create <DBTaskQueue>(); this.tasks.Add(taskQueue); } }