Skip to content

Commit

Permalink
RunCrawlingTaskById
Browse files Browse the repository at this point in the history
  • Loading branch information
Oceania2018 committed Aug 23, 2024
1 parent c928262 commit 3eddcb9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -293,4 +293,5 @@ logs
wwwroot
appsettings.Production.json
*.csproj.user
env/
env/
FodyWeavers.*
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ public CacheService(BotSharpDatabaseSettings settings)

public async Task<T?> GetAsync<T>(string key)
{
#if DEBUG
return default;
#endif
if (string.IsNullOrEmpty(_settings.Redis))
{
return default;
Expand All @@ -39,6 +42,9 @@ public CacheService(BotSharpDatabaseSettings settings)

public async Task<object> GetAsync(string key, Type type)
{
#if DEBUG
return default;
#endif
if (string.IsNullOrEmpty(_settings.Redis))
{
return default;
Expand All @@ -63,6 +69,9 @@ public async Task<object> GetAsync(string key, Type type)

public async Task SetAsync<T>(string key, T value, TimeSpan? expiry)
{
#if DEBUG
return;
#endif
if (string.IsNullOrEmpty(_settings.Redis))
{
return;
Expand Down

0 comments on commit 3eddcb9

Please sign in to comment.