-
Notifications
You must be signed in to change notification settings - Fork 37
refactored locale related changes in download template function #1707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* added key in producer for parallelism * added key for producing messages in mapping flow * Update Producer.ts --------- Co-authored-by: ashish-egov <[email protected]>
- Add parallel message processing with concurrency limit to reduce lag - Throw error for extra sheets in uploaded Excel files (strict validation) - Add DB-level microplan campaign detection utility and use in download logic - Refactor microplan/standard generation triggers for clarity and correctness - Ensure Kafka consumer error and offset handlers are always present
Campaign update new flow
removed locale from default request info in download template function
|
Caution Review failedFailed to post review comments. Configuration used: .coderabbit.yaml 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (14)📓 Common learnings📚 Learning: 2024-12-04T11:51:07.331ZApplied to files:
📚 Learning: 2024-12-04T12:30:22.889ZApplied to files:
📚 Learning: 2024-10-08T20:11:12.539ZApplied to files:
📚 Learning: 2024-10-08T20:11:07.772ZApplied to files:
📚 Learning: 2024-12-04T11:51:01.303ZApplied to files:
📚 Learning: 2025-05-07T08:53:03.650ZApplied to files:
📚 Learning: 2025-05-29T06:53:25.851ZApplied to files:
📚 Learning: 2024-09-27T05:03:24.501ZApplied to files:
📚 Learning: 2024-09-27T05:11:37.733ZApplied to files:
📚 Learning: 2025-05-05T11:46:06.216ZApplied to files:
📚 Learning: 2024-10-08T20:11:07.773ZApplied to files:
📚 Learning: 2024-06-26T17:13:14.997ZApplied to files:
📚 Learning: 2025-01-30T06:12:02.730ZApplied to files:
🪛 Gitleaks (8.27.2)health-services/project-factory/src/server/utils/campaignUtils.ts2640-2640: Detected a Generic API Key, potentially exposing access to various services and sensitive operations. (generic-api-key) 🪛 Biome (2.1.2)health-services/project-factory/src/server/utils/campaignUtils.ts[error] 2635-2635: Unsafe usage of optional chaining. If it short-circuits with 'undefined' the evaluation will throw TypeError here: (lint/correctness/noUnsafeOptionalChaining) [error] 2718-2718: Unsafe usage of optional chaining. If it short-circuits with 'undefined' the evaluation will throw TypeError here: (lint/correctness/noUnsafeOptionalChaining) ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (9)
WalkthroughThis update introduces significant changes across the health-services/project-factory module. Major updates include migrating Kafka integration from Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Controller
participant Service
participant Utils
participant Kafka
participant DB
Client->>Controller: POST /v1/project-type/cancel-campaign
Controller->>Service: cancelCampaignService(request)
Service->>Utils: validateAndFetchCampaign(request)
Utils->>DB: Query campaign by campaignId
DB-->>Utils: Campaign data
Utils-->>Service: Validated campaign
Service->>Utils: prepareAndProduceCancelMessage(campaign, RequestInfo, request)
Utils->>Kafka: Produce cancel message (status: cancelled)
Kafka-->>Utils: Ack
Utils-->>Service: Result
Service-->>Controller: Cancel result
Controller-->>Client: Response
sequenceDiagram
participant Kafka
participant Listener
participant Handler
participant Semaphore
Kafka->>Listener: Message received
Listener->>Semaphore: Check concurrency
alt Concurrency < limit
Listener->>Handler: processMessageKJS(message)
Handler-->>Listener: Done
Listener->>Semaphore: Release slot
else Concurrency >= limit
Listener->>Listener: Wait, log warning
end
Estimated code review effort🎯 5 (Critical) | ⏱️ ~90 minutes Poem
Note 🔌 MCP (Model Context Protocol) integration is now available in Early Access!Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context. ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 14
health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts
Show resolved
Hide resolved
health-services/project-factory/src/server/utils/onGoingCampaignUpdateUtils.ts
Show resolved
Hide resolved
health-services/project-factory/src/server/validators/campaignValidators.ts
Show resolved
Hide resolved
This reverts commit 16709f3.
* Change logs * Gap fix * Version Incremented * Removed old process track logics * Refactor * Refactor * Migrate.sh fix * Some fixes * Fix sheetname * Some Refactors * Removal or changedates and retry via controller (code cleanup) * App module mdms call made parallel and optimised * User phone number length from env * Removed unused idgen call * Refactored * Removed date validation in draft * Microplan v1 pai flow revived * Removed user microplan sheet from autogenerate * Kafka key (#1694) * added key in producer for parallelism * added key for producing messages in mapping flow * Update Producer.ts --------- Co-authored-by: ashish-egov <[email protected]> * feat: Improve Kafka consumer concurrency and robustness - Add parallel message processing with concurrency limit to reduce lag - Throw error for extra sheets in uploaded Excel files (strict validation) - Add DB-level microplan campaign detection utility and use in download logic - Refactor microplan/standard generation triggers for clarity and correctness - Ensure Kafka consumer error and offset handlers are always present * ForceUpdate True * Forec update true * Some fixes * Error message fix * Error fix * Error fix * udpated logic of campaign dates once the date is change at any boundary level * made changes for like search and update dates of campaign based onrequest flags * Kafka change to kafkajs * Producer Retry * Kafka logs * Dates messages added * Some fixes * Some loggers * error loggers * removed kafka node --------- Co-authored-by: Jagankumar E <[email protected]> Co-authored-by: nitish-egov <[email protected]>
Summary by CodeRabbit
New Features
Improvements
Bug Fixes
Refactor
Chores