From 2da45b9fbf74d365951e37a4152f30e76caaeb98 Mon Sep 17 00:00:00 2001 From: Bobby <30593201+luciferreeves@users.noreply.github.com> Date: Fri, 6 Feb 2026 17:45:55 +0530 Subject: Refactor task management and producer synchronization - Updated TaskManager to utilize repositories for database operations, improving separation of concerns. - Enhanced logging functionality by replacing logger.Log with logger.Infof, logger.Warnf, and logger.Errorf for better readability and consistency. - Simplified ProducerSync function by removing unnecessary pagination logic and directly fetching producer data. - Introduced helper functions for calculating progress and managing task statuses. - Added new service for fetching and saving anime data, integrating multiple data sources (Jikan, Anilist, MALsync, TMDB, TVDB, Aniskip). - Created new types for task management and improved overall code organization. - Removed deprecated database calls and replaced them with repository methods for better maintainability. --- utils/api/malsync/malsync.go | 2 -- 1 file changed, 2 deletions(-) (limited to 'utils/api/malsync') diff --git a/utils/api/malsync/malsync.go b/utils/api/malsync/malsync.go index 1ee479c..9509707 100644 --- a/utils/api/malsync/malsync.go +++ b/utils/api/malsync/malsync.go @@ -88,7 +88,6 @@ func (c *client) makeRequest(ctx context.Context, url string) ([]byte, error) { switch response.StatusCode { case http.StatusNotFound: - // Not found is not an error, return nil return nil, nil case http.StatusTooManyRequests: retryAfter := c.getRetryAfterDuration(response) @@ -131,7 +130,6 @@ func GetAnimeByMALID(malID int) (*types.MalsyncAnimeResponse, error) { return nil, errors.New("failed to fetch anime data from Malsync API") } - // Handle 404 case where makeRequest returns nil, nil if bytes == nil { return nil, nil } -- cgit v1.2.3