Skip to content

Conversation

@langdal
Copy link
Member

@langdal langdal commented Nov 26, 2025

No description provided.

@langdal langdal requested a review from Copilot November 26, 2025 14:01
Copy link

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 optimizer codebase by separating HTTP request handling logic from the core optimizer execution logic. The main goal is to improve modularity by moving HTTP-specific concerns (Redis queue management, job handling, client disconnection checks) into a dedicated handler module.

Key Changes:

  • Created a new optimizer_handler.py module to handle HTTP requests and job queue management
  • Refactored optimizer.py to contain only the core optimizer execution logic
  • Updated import references in tests and OpenAPI specification to point to the new handler module

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
optimizerapi/optimizer_handler.py New file containing HTTP request handlers, Redis/RQ job management, and client disconnection logic previously in optimizer.py
optimizerapi/optimizer.py Simplified to contain only core optimizer execution logic; removed HTTP-specific dependencies (connexion, Redis, RQ) and handler functions
tests/test_optimizer.py Updated import statement to use the new optimizer_handler module
optimizerapi/openapi/specification.yml Updated operationId to reference the new optimizer_handler.run function

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@langdal langdal merged commit 6582037 into main Nov 26, 2025
2 checks passed
@langdal langdal deleted the small-refactoring branch November 26, 2025 14:15
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