net8로 빌드함 9로 했었는데 vs버전 업데이트 안해서 빌드가 안됨 스코어 얻는 부분 롤백함 아마 고쳐졌을듯
This commit is contained in:
+5
-6
@@ -69,7 +69,7 @@ app.MapPost("submit", (string name, int score) =>
|
|||||||
List<int> weekArrow = [];
|
List<int> weekArrow = [];
|
||||||
|
|
||||||
//weekly Jobs (dbReset, WeekArrowGen...)
|
//weekly Jobs (dbReset, WeekArrowGen...)
|
||||||
System.Timers.Timer resetTimer = new(10000); // 10000ms = 10 seconds => 1week = ?ms mol ra si bal
|
System.Timers.Timer resetTimer = new(43200000); // 10000ms = 10 seconds => 1week = ?ms mol ra si bal
|
||||||
resetTimer.Elapsed += (sender, e) =>
|
resetTimer.Elapsed += (sender, e) =>
|
||||||
{
|
{
|
||||||
//TimeOnly curTime = new(DateTime.Now.Hour, DateTime.Now.Minute);
|
//TimeOnly curTime = new(DateTime.Now.Hour, DateTime.Now.Minute);
|
||||||
@@ -81,7 +81,7 @@ resetTimer.Elapsed += (sender, e) =>
|
|||||||
//weekArrow.Clear();
|
//weekArrow.Clear();
|
||||||
// Log reset actio
|
// Log reset actio
|
||||||
var logger = app.Services.GetRequiredService<ILogger<Program>>();
|
var logger = app.Services.GetRequiredService<ILogger<Program>>();
|
||||||
//logger.LogInformation("doWeekJobs");
|
logger.LogInformation("do every 12hour Jobs");
|
||||||
|
|
||||||
// Clear the scoreDB
|
// Clear the scoreDB
|
||||||
scoreDBini.Clear();
|
scoreDBini.Clear();
|
||||||
@@ -101,13 +101,12 @@ resetTimer.Elapsed += (sender, e) =>
|
|||||||
// int rngNum = (int)random.NextInt64(0, 4);
|
// int rngNum = (int)random.NextInt64(0, 4);
|
||||||
// weekArrow.Add(rngNum/*(int)random.NextInt64(0, 4)*/);
|
// weekArrow.Add(rngNum/*(int)random.NextInt64(0, 4)*/);
|
||||||
// //logger.LogInformation(rngNum.ToString());
|
// //logger.LogInformation(rngNum.ToString());
|
||||||
//}//자기 자신이 읽고있다고 못 읽으면 난 뭐 어떻게 받아들여야함? => resetTimer가 메인 스레드가 아닌 다른 스레드에서 동작한다는 카더라가 있음
|
//}//자기 자신이 읽고있다고 못 읽으면 난 뭐 어떻게 받아들여야함? => resetTimer가 메인 스레드가 아닌 다른 스레드에서 동작한다는 카더라가 있음 => jobini클래스에서 메서드 하나 빼먹었다고 생긴 문제인듯? 아마 해결됨
|
||||||
resetTimer.Start();
|
resetTimer.Start();
|
||||||
//기록된 점수 얻기
|
//기록된 점수 얻기
|
||||||
app.MapGet("/", () => /*scoreDB);*/scoreDB = scoreDBini.ReadDictionary());//scoreDBini.ReadDictionary);
|
app.MapGet("/", () => /*scoreDB);*/scoreDB = scoreDBini.ReadDictionary());//scoreDBini.ReadDictionary);
|
||||||
|
|
||||||
app.MapGet("WeekArrow", () => weekArrow
|
app.MapGet("WeekArrow", ()=> weekArrow);
|
||||||
);
|
|
||||||
|
|
||||||
//app.UseHttpsRedirection();
|
//app.UseHttpsRedirection();
|
||||||
app.UseStaticFiles();
|
app.UseStaticFiles();
|
||||||
@@ -120,5 +119,5 @@ app.UseRouting();
|
|||||||
|
|
||||||
app.MapRazorPages();
|
app.MapRazorPages();
|
||||||
|
|
||||||
//이미minio에서 8000~8001사용중
|
//이미minio에서 8000~8001사용중 => 근데 왜 8004씀? 그냥
|
||||||
app.Run("http://localhost:8004");
|
app.Run("http://localhost:8004");
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net9.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Platforms>AnyCPU;ARM64</Platforms>
|
<Platforms>AnyCPU;ARM64</Platforms>
|
||||||
|
|||||||
Reference in New Issue
Block a user