Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -7,13 +7,13 @@ namespace mstdnCats.Services
|
||||
{
|
||||
public class RunCheck
|
||||
{
|
||||
public static async Task<bool> runAsync(IDocumentCollection<Post> _db, TelegramBotClient _bot, string _tag, ILogger<MastodonBot>? logger, string _instance = "https://haminoa.net")
|
||||
public static async Task<bool> runAsync(IDocumentCollection<Post> _db, TelegramBotClient _bot, string _tag, ILogger<MastodonBot>? logger, string _instance)
|
||||
{
|
||||
// Run check
|
||||
try
|
||||
{
|
||||
//try
|
||||
//{
|
||||
// First get posts
|
||||
var posts = await PostResolver.GetPostsAsync(_tag, logger, _instance);
|
||||
var posts = await PostResolver.GetPostsAsync(_tag, logger, _instance??"https://haminoa.net");
|
||||
|
||||
if (posts == null)
|
||||
{
|
||||
@@ -22,11 +22,12 @@ namespace mstdnCats.Services
|
||||
|
||||
// Then process them
|
||||
await ProcessPosts.checkAndInsertPostsAsync(_db, _bot, posts, logger);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger?.LogCritical("Error while running check: " + ex.Message);
|
||||
}
|
||||
//}
|
||||
//catch (Exception ex)
|
||||
//{
|
||||
// logger?.LogCritical("Error while running check: " + ex.Message);
|
||||
// throw new Exception("Error while running check: " + ex.Message);
|
||||
//}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user