Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
area363 committed Nov 7, 2023
1 parent 7a82440 commit 713b38b
Showing 1 changed file with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,17 +278,6 @@ public void Migration(
_blockHash = block.Hash;
_blockIndex = block.Index;
_blockTimeOffset = block.Timestamp;
foreach (var tx in block.Transactions)
{
_txList.Add(TransactionData.GetTransactionInfo(block, tx));

// check if address is already in _agentCheck
if (!_agentCheck.Contains(tx.Signer.ToString()))
{
_agentList.Add(AgentData.GetAgentInfo(tx.Signer));
_agentCheck.Add(tx.Signer.ToString());
}
}

taskArray[item.i] = Task.Factory.StartNew(() =>
{
Expand All @@ -302,6 +291,8 @@ public void Migration(
{
remainingCount -= interval;
offsetIdx += interval;
_mySqlStore.StoreItemEnhancementList(_itemEnhancementList);
_itemEnhancementList.Clear();
}
else
{
Expand All @@ -317,13 +308,16 @@ public void Migration(
Console.WriteLine("Data Preparation Complete! Time Elapsed: {0}", postDataPrep - start);
Console.WriteLine("Start Data Migration...");
_mySqlStore.StoreItemEnhancementList(_itemEnhancementList);
_itemEnhancementList.Clear();
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}

DateTimeOffset end = DateTimeOffset.UtcNow;
_mySqlStore.StoreItemEnhancementList(_itemEnhancementList);
_itemEnhancementList.Clear();
Console.WriteLine("Migration Complete! Time Elapsed: {0}", end - start);
}

Expand Down

0 comments on commit 713b38b

Please sign in to comment.