Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
immisterio committed May 13, 2023
1 parent 8a0125c commit 30f014b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Controllers/CRON/SelezenController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ async public Task<string> ParseAllTask()

_parseAllTaskWork = true;

try
foreach (var val in taskParse.ToArray())
{
foreach (var val in taskParse.ToArray())
try
{
if (DateTime.Today == val.updateTime)
continue;
Expand All @@ -154,8 +154,8 @@ async public Task<string> ParseAllTask()
if (res)
val.updateTime = DateTime.Today;
}
catch { }
}
catch { }

_parseAllTaskWork = false;
return "ok";
Expand All @@ -167,7 +167,7 @@ async public Task<string> ParseAllTask()
async Task<bool> parsePage(int page)
{
#region Авторизация
if (Cookie == null && AppInit.conf.Selezen.cookie == null)
if (Cookie == null && string.IsNullOrEmpty(AppInit.conf.Selezen.cookie))
{
if (await TakeLogin() == false)
return false;
Expand Down
2 changes: 1 addition & 1 deletion Engine/FileDB/FileDB.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public void Dispose()
{
val.openconnection -= 1;
if (val.openconnection <= 0 && !AppInit.conf.evercache)
openWriteTask.Remove(fdbkey);
openWriteTask.TryRemove(fdbkey, out _);
}
}
#endregion
Expand Down
2 changes: 1 addition & 1 deletion Engine/FileDB/staticDB.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public partial class FileDB : IDisposable
/// </summary>
public static ConcurrentDictionary<string, DateTime> masterDb = new ConcurrentDictionary<string, DateTime>();

static Dictionary<string, WriteTaskModel> openWriteTask = new Dictionary<string, WriteTaskModel>();
static ConcurrentDictionary<string, WriteTaskModel> openWriteTask = new ConcurrentDictionary<string, WriteTaskModel>();

static FileDB()
{
Expand Down

0 comments on commit 30f014b

Please sign in to comment.