Skip to content
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

fix(db): submission datetime #394

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aldbr
Copy link
Contributor

@aldbr aldbr commented Feb 3, 2025

Closes #341

Note:

  • I disable inherit_cache in date_trunc because I had weird results when calling the search endpoint multiple times in a row.

  • The time_resolution does not seem to be part of the cached keys and whatever is the first time_resolution to be used becomes the "reference" in subsequent calls.

    Example:

    WHERE strftime(?, "Jobs"."SubmissionTime") = ?) AS anon_1

    Here ? seems to be replaced with the first cached value instead of the one we want to use.

  • I haven't found an easy way to include the time_resolution parameter in the cache keys, but my knowledge of sqlalchemy is very limited, and I might have overlooked something.

  • If you want to easily reproduce the issue, you can just switch inherit_cache to True and execute the tests.

@aldbr aldbr force-pushed the main_FIX_submission-time branch from 2e412d7 to 6554102 Compare February 3, 2025 16:07
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.

/api/jobs/search not robust enough with DateTime?
1 participant