Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces RSS feed parsing, automatic posting creation, and periodic synchronization via a scheduler. It also includes updates to configuration handling and database connection parameters for consistency.
- Added RSS feed parsing using gofeed and posting creation logic.
- Implemented a scheduler using robfig/cron for periodic RSS synchronization.
- Updated configuration and database connection to use the standardized "DB" naming.
Reviewed Changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| internal/testutils/db.go | Updated database connection parameter from "Db" to "DB". |
| internal/schemasupport/posting_tags.go | Added helper function to create PostingTags from a string slice. |
| internal/scheduler/scheduler.go | Implemented scheduler setup and RSS synchronization job. |
| internal/rss/rss_parser_test.go | Added unit tests for syncing RSS feeds with mock server. |
| internal/rss/rss_parser.go | Implemented RSS items fetching, processing, and posting creation. |
| internal/http/router/router.go | Added new RSS sync endpoints. |
| internal/http/handler/rsshandler.go | Implemented HTTP handlers for syncing RSS feeds. |
| internal/database/database.go | Updated database connection parameter from "Db" to "DB". |
| config/config.go | Updated configuration structs and environment variable handling. |
| cmd/main.go | Integrated the scheduler startup/shutdown in the main app. |
| CLAUDE.md | Added documentation for using Claude Code in the repo. |
Files not reviewed (1)
- go.mod: Language not supported
report: Run #73
❌ Some tests failed!
|
report: Run #73
❌ Some tests failed!
|
pilyang
commented
Apr 20, 2025
Member
Author
pilyang
left a comment
There was a problem hiding this comment.
요거 로컬에서는 내가 따로 테스트 돌려도 성공하는데, 왜 액션에서 실패하는 이유 한번 따로 파악해봐야할듯....
바이브코딩이슈인지 먼가 내가 초기에 액션 설정이나 머 잘못한거 있는지 너무 오랜만에 이거 코드 보는거라 파악 필요....
iamjooon2
reviewed
Apr 30, 2025
Comment on lines
+122
to
+130
| for _, company := range companies { | ||
| if company.RssURL != nil { | ||
| count, err := SyncCompanyRSSFeed(ctx, client, company.ID) | ||
| if err != nil { | ||
| log.Printf("Failed to sync RSS feed for company %s: %v", company.Name, err) | ||
| continue | ||
| } | ||
| totalCount += count | ||
| log.Printf("Synced %d new postings for %s", count, company.Name) |
Member
There was a problem hiding this comment.
잘 모르고 남기는 걸수도 있음!!
rss 피드 수집하는거 순차적으로 도는 걸로 이해했는데
나중에 여기 고루틴 써볼 수 있을듯?!
| log.Println("Starting RSS feed sync...") | ||
|
|
||
| // Create a context with timeout | ||
| ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) |
Comment on lines
+24
to
+29
| c := cron.New(cron.WithSeconds()) | ||
| return &Scheduler{ | ||
| client: client, | ||
| cron: c, | ||
| config: config, | ||
| } |
Member
There was a problem hiding this comment.
Suggested change
| c := cron.New(cron.WithSeconds()) | |
| return &Scheduler{ | |
| client: client, | |
| cron: c, | |
| config: config, | |
| } | |
| c := cron.New( | |
| cron.WithSeconds(), | |
| cron.WithLogger(cron.VerbosePrintfLogger(log.Default())), // 상세히 찍히는 로그! | |
| cron.WithChain( | |
| cron.Recover(cron.DefaultLogger), // panic 복구 | |
| ), | |
| ) | |
| return &Scheduler{ | |
| client: client, | |
| cron: c, | |
| config: config, | |
| } |
찾아보니 요래 미들웨어형식으로 추가해줄 수 있다고 하네
withChain은 Job 돌아가다가 Panic이 발생해도 스케줄러는 계속 돌아가도록 하는 넘!
iamjooon2
reviewed
Apr 30, 2025
| } | ||
|
|
||
| // Default to every hour if not specified | ||
| rssSyncCron := "0 0 * * * *" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
클로드 코드로 일단 그냥 바이브코딩 해봄
아래 내용도 클로드 시켜서 만든 PR 요약
ps. 난 그냥 어떤거 해야하는지 시키고, 대충봐도 보이는 잘못된부분들 좀 짚어주면서 만들라 시키고, 버그수정도 이친구보고 테스트코드 만들라하고 이친구가 자동으로 테스트 실행해보면서 거기 나오는 로그 분석해서 맞춰서 코드 수정하고 그냥 지 혼자 다함. 난 에디터에서 직접 코드 수정한거 이번 PR에서는 하나도 없게 한번 해봄.
필요한 dependency 설치 커맨드도, 테스트코드 실행도, 깃 커밋도 전부 다 클로드가 함, 난 claude code 내에서 시킨것만있음 진짜로
따라서 이거 나중에 좀 시간날때 나도 다시한번 잘 만들어진거 맞나 리뷰 나도 해봐야함ㅎㅎ
ps2. 총 소요시간 + api 요금
느낀바 : 이번엔 그냥 무지성 해줘 바이브코딩에 약간 너무 이상한거 짚어주기정도였는데, 좀 내가 작업하면서 같이 사용하고 범위 특정해주고, 익숙해지면 좀 더 싸게도 처리할 수 있을듯. 소요 시간은 중간중간 더 자세히 좀 리뷰해주고 하는 시간들 들여보고 해야해서 불확실
RSS 피드 수집 및 포스팅 자동화 기능 추가
주요 변경사항
구현 세부 내용
internal/rss: RSS 피드 파싱 및 포스팅 생성 로직 구현internal/scheduler: 주기적인 RSS 피드 동기화를 위한 스케줄러 구현internal/http/handler/rsshandler.go: RSS 관련 API 핸들러 구현테스트
기타 개선사항
Db->DB)