그리드 표현 일부 완료. 데이터 검측 필수 예정
This commit is contained in:
@@ -123,9 +123,7 @@ class Program
|
||||
await ExcelLoader.ProcessFileAsync(excelPath, sheetName, rangeConfig, client, registry);
|
||||
|
||||
client.ExecuteBatch(); // Commit
|
||||
|
||||
// Verification Dump
|
||||
DumpSample(sheetName);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -135,25 +133,4 @@ class Program
|
||||
server.SaveCheckpoint();
|
||||
Console.WriteLine("Done.");
|
||||
}
|
||||
|
||||
static void DumpSample(string sheetName)
|
||||
{
|
||||
Console.WriteLine("\n--- Exporting to sample.txt ---");
|
||||
using var redis = StackExchange.Redis.ConnectionMultiplexer.Connect("localhost:3278");
|
||||
var serverEnd = redis.GetServer("localhost:3278");
|
||||
var db = redis.GetDatabase();
|
||||
var keys = serverEnd.Keys(pattern: $"{sheetName}:*");
|
||||
|
||||
using (var writer = new StreamWriter("sample.txt"))
|
||||
{
|
||||
int count = 0;
|
||||
foreach(var key in keys)
|
||||
{
|
||||
string val = db.StringGet(key);
|
||||
writer.WriteLine($"{key} = {val}");
|
||||
count++;
|
||||
}
|
||||
Console.WriteLine($"[Export] Written {count} keys to sample.txt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user