Skip to content

Release 20250717#11

Merged
MistEO merged 4 commits into
mainfrom
dev
Jul 17, 2025
Merged

Release 20250717#11
MistEO merged 4 commits into
mainfrom
dev

Conversation

@MistEO

@MistEO MistEO commented Jul 17, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@MistEO MistEO requested a review from Copilot July 17, 2025 05:50

This comment was marked as outdated.

MistEO and others added 2 commits July 17, 2025 13:53
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@MistEO MistEO requested a review from Copilot July 17, 2025 05:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 implements a new contact us feature and converts the plan cache system to use async/await with thread safety improvements. The release includes both new functionality and performance optimizations to existing caching mechanisms.

  • Adds a new ContactUs database model and API endpoint for retrieving contact information
  • Converts plan cache functions from synchronous to asynchronous with proper locking
  • Increases cache expiration times from 60 to 600 seconds for better performance

Reviewed Changes

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

Show a summary per file
File Description
src/database/init.py Adds ContactUs model definition and table creation
src/contact_us/init.py Implements new contact us API endpoint with caching
src/plan/cache.py Converts to async with thread safety and extended cache duration
src/plan/summary.py Updates to use async plan cache function
src/plan/details.py Updates to use async plan cache function
main.py Registers the new contact us router
Comments suppressed due to low confidence (2)

src/contact_us/init.py:10

  • [nitpick] The variable name 'cache' is too generic and could conflict with other cache variables. Consider renaming to 'contact_us_cache' for clarity.
cache = None

src/contact_us/init.py:14

  • [nitpick] Function name 'get_cache' is too generic. Consider renaming to 'get_contact_us_cache' to match the pattern used in the plan module.
async def get_cache():


CacheExpiration = 600 # 秒
cache = None
cache_lock = asyncio.Lock()

Copilot AI Jul 17, 2025

Copy link

Choose a reason for hiding this comment

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

Missing import for asyncio module. Add 'import asyncio' at the top of the file.

Copilot uses AI. Check for mistakes.

router = APIRouter()

CacheExpiration = 600 # 秒

Copilot AI Jul 17, 2025

Copy link

Choose a reason for hiding this comment

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

Cache expiration constant is duplicated between this file and src/plan/cache.py. Consider extracting to a shared configuration module to avoid duplication.

Copilot uses AI. Check for mistakes.
@MistEO MistEO merged commit a2bcb7f into main Jul 17, 2025
1 check passed
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