Ejemplo n.º 1
0
        private async void PurgeFakeDatabases()
        {
            var databasesResponse = _influx.ShowDatabasesAsync();
            var dbs = databasesResponse.Result;

            foreach (var db in dbs)
            {
                if (db.Name.StartsWith(_fakeDbPrefix))
                {
                    await _influx.DropDatabaseAsync(db.Name);
                }
            }
        }
Ejemplo n.º 2
0
        public async Task Configure()
        {
            var dbs = await _influxDb.ShowDatabasesAsync();

            if (dbs.All(x => x.Name != "machinedata"))
            {
                await _influxDb.CreateDatabaseAsync("machinedata");
            }
        }