Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Leverage the ORM selectivity to reduce the amount of data fetched from the RDBMS#244

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
yqzhang wants to merge1 commit intodjango-background-tasks:master
base:master
Choose a base branch
Loading
fromyqzhang:patch-1

Conversation

@yqzhang
Copy link

@yqzhangyqzhang commentedAug 6, 2020
edited
Loading

Since we only need a subset of the tasks from the database, try to leverage the ORM to filter the records on the database to avoid having to send all the unrelated tasks back from the database. This used to be an extremely expensive operation when you have a large number of tasks in the database.

jgillard, erjemin, and longhotsummer reacted with thumbs up emoji
@coveralls
Copy link

Coverage Status

Coverage decreased (-3.3%) to 73.492% when pullingdee6ad1 on yqzhang:patch-1 intoe04d44c on arteria:master.

@yqzhangyqzhang changed the titleUpdate tasks.pyLeverage the ORM selectivity to reduce the amount of data fetched from the RDBMSAug 20, 2020
@schmave
Copy link

Looks like a good change to me! This also fixes a bug where if the next 5 tasks to run are not in tasks._tasks, no tasks will be run.

yqzhang reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@yqzhang@coveralls@schmave

[8]ページ先頭

©2009-2025 Movatter.jp