Skip to content

Commit

Permalink
Wrapping async functions to be waited
Browse files Browse the repository at this point in the history
  • Loading branch information
U-lis committed Jul 9, 2024
1 parent 9133652 commit 207da16
Showing 1 changed file with 17 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace NineChronicles.DataProvider
{
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Lib9c.Renderers;
using Libplanet.Action.State;
using Nekoyume.Action.AdventureBoss;
Expand All @@ -23,25 +24,28 @@ public partial class RenderSubscriber

private void StoreAdventureBossList()
{
Log.Information("[Adventure Boss] Store adventure boss list");
Task.Run(async () =>
{
Log.Information("[Adventure Boss] Store adventure boss list");
Log.Information($"[Adventure Boss] {_adventureBossSeasonList.Count} Season");
MySqlStore.StoreAdventureBossSeasonList(_adventureBossSeasonList);
Log.Information($"[Adventure Boss] {_adventureBossSeasonList.Count} Season");
await MySqlStore.StoreAdventureBossSeasonList(_adventureBossSeasonList);
Log.Information($"[Adventure Boss] {_adventureBossWantedList.Count} Wanted");
MySqlStore.StoreAdventureBossWantedList(_adventureBossWantedList);
Log.Information($"[Adventure Boss] {_adventureBossWantedList.Count} Wanted");
await MySqlStore.StoreAdventureBossWantedList(_adventureBossWantedList);
Log.Information($"[Adventure Boss] {_adventureBossChallengeList.Count} Challenge");
MySqlStore.StoreAdventureBossChallengeList(_adventureBossChallengeList);
Log.Information($"[Adventure Boss] {_adventureBossChallengeList.Count} Challenge");
await MySqlStore.StoreAdventureBossChallengeList(_adventureBossChallengeList);
Log.Information($"[Adventure Boss] {_adventureBossRushList.Count} Rush");
MySqlStore.StoreAdventureBossRushList(_adventureBossRushList);
Log.Information($"[Adventure Boss] {_adventureBossRushList.Count} Rush");
await MySqlStore.StoreAdventureBossRushList(_adventureBossRushList);
Log.Information($"[Adventure Boss] {_adventureBossUnlockFloorList.Count} Unlock");
MySqlStore.StoreAdventureBossUnlockFloorList(_adventureBossUnlockFloorList);
Log.Information($"[Adventure Boss] {_adventureBossUnlockFloorList.Count} Unlock");
await MySqlStore.StoreAdventureBossUnlockFloorList(_adventureBossUnlockFloorList);
Log.Information($"[Adventure Boss] {_adventureBossClaimRewardList.Count} claim");
MySqlStore.StoreAdventureBossClaimRewardList(_adventureBossClaimRewardList);
Log.Information($"[Adventure Boss] {_adventureBossClaimRewardList.Count} claim");
await MySqlStore.StoreAdventureBossClaimRewardList(_adventureBossClaimRewardList);
});
}

private void ClearAdventureBossList()
Expand Down

0 comments on commit 207da16

Please sign in to comment.