|
|
@@ -44,27 +44,32 @@ namespace MySystem
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public void StartTest()//启动
|
|
|
+ public void StartRepeat()//启动
|
|
|
{
|
|
|
- Thread thread = new Thread(ListenTest);
|
|
|
+ Thread thread = new Thread(ListenRepeat);
|
|
|
thread.IsBackground = true;
|
|
|
thread.Start();
|
|
|
}
|
|
|
|
|
|
- public void ListenTest()//启动
|
|
|
+ public void ListenRepeat()//启动
|
|
|
{
|
|
|
- string check = function.ReadInstance("/LeaderComp/Repeat/202505.txt");
|
|
|
- if (string.IsNullOrEmpty(check))
|
|
|
+ while(true)
|
|
|
{
|
|
|
- function.WritePage("/LeaderComp/Repeat/", "202505.txt", DateTime.Now.ToString());
|
|
|
- Ready("202505");
|
|
|
+ string month = RedisDbconn.Instance.RPop<string>("LeaderCompRepeatQueue");
|
|
|
+ if(!string.IsNullOrEmpty(month))
|
|
|
+ {
|
|
|
+ string check = function.ReadInstance("/LeaderComp/Repeat/" + month + ".txt");
|
|
|
+ if (string.IsNullOrEmpty(check))
|
|
|
+ {
|
|
|
+ function.WritePage("/LeaderComp/Repeat/", "" + month + ".txt", DateTime.Now.ToString());
|
|
|
+ Ready(month);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Thread.Sleep(120000);
|
|
|
+ }
|
|
|
}
|
|
|
- // check = function.ReadInstance("/LeaderComp/Repeat/202503.txt");
|
|
|
- // if (string.IsNullOrEmpty(check))
|
|
|
- // {
|
|
|
- // function.WritePage("/LeaderComp/Repeat/", "202503.txt", DateTime.Now.ToString());
|
|
|
- // Ready("202503");
|
|
|
- // }
|
|
|
}
|
|
|
|
|
|
public void Ready(string curMonth)
|