Skip to content

refactor appState and proxy#258

Merged
ChuckHend merged 11 commits intomainfrom
state-refactor
Oct 12, 2025
Merged

refactor appState and proxy#258
ChuckHend merged 11 commits intomainfrom
state-refactor

Conversation

@ChuckHend
Copy link
Copy Markdown
Owner

@ChuckHend ChuckHend commented Oct 11, 2025

  • separate the proxy logic from server
  • move cache update process into its own module
  • creates appState struct

@ChuckHend ChuckHend requested a review from Copilot October 11, 2025 19:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the application state management and proxy logic to improve code organization and maintainability. The main goals are separating concerns between server, proxy, and cache management components.

  • Creates a centralized AppState struct to hold shared application state including database pools, job cache, and worker health monitoring
  • Extracts proxy startup logic from main.rs into the proxy module for better separation of concerns
  • Moves cache synchronization functionality into a dedicated cache module

Reviewed Changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
server/src/app_state.rs New module defining AppState struct with initialization logic
server/src/cache.rs New module containing job cache management and sync functionality
server/src/main.rs Simplified main function using AppState, moved proxy logic to proxy module
server/src/routes/*.rs Updated route handlers to use AppState instead of individual dependencies
proxy/src/proxy.rs Added start_postgres_proxy function moved from main.rs
extension/src/*.rs Minor code cleanup removing deprecated functions and dead code

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread server/src/routes/search.rs
Comment thread extension/src/search.rs
@ChuckHend ChuckHend marked this pull request as ready for review October 11, 2025 19:33
@ChuckHend ChuckHend merged commit adf057e into main Oct 12, 2025
11 checks passed
@ChuckHend ChuckHend deleted the state-refactor branch October 12, 2025 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants