clean up logging in GH provider

This commit is contained in:
Emil Lerch 2025-07-19 13:19:22 -07:00
parent fa061e7353
commit 292b3ce535
Signed by: lobo
GPG key ID: A7B62D657EF764F8

View file

@ -13,6 +13,8 @@ token: []const u8,
const Self = @This(); const Self = @This();
const log = std.log.scoped(.@"");
const RepoFetchTask = struct { const RepoFetchTask = struct {
allocator: Allocator, allocator: Allocator,
token: []const u8, token: []const u8,
@ -48,18 +50,14 @@ pub fn fetchReleases(self: *Self, allocator: Allocator) !ArrayList(Release) {
} }
const starred_end_time = std.time.milliTimestamp(); const starred_end_time = std.time.milliTimestamp();
if (starred_repos.items.len == 0) { if (starred_repos.items.len == 0) return releases;
return releases;
}
const starred_duration: u64 = @intCast(starred_end_time - starred_start_time); const starred_duration: u64 = @intCast(starred_end_time - starred_start_time);
std.log.debug("GitHub: Found {} starred repositories in {}ms", .{ starred_repos.items.len, starred_duration }); log.debug("Found {} starred repositories in {}ms", .{ starred_repos.items.len, starred_duration });
// Check for potentially inaccessible repositories due to enterprise policies // Check for potentially inaccessible repositories due to enterprise policies
// try checkForInaccessibleRepos(allocator, &client, self.token, starred_repos.items); // try checkForInaccessibleRepos(allocator, &client, self.token, starred_repos.items);
std.log.debug("GitHub: Processing {} starred repositories with thread pool...", .{starred_repos.items.len});
const thread_start_time = std.time.milliTimestamp(); const thread_start_time = std.time.milliTimestamp();
// Create thread pool - use reasonable number of threads for API calls // Create thread pool - use reasonable number of threads for API calls