Skip to content

[IMP] purge uninstalled unavailable modules in bulk - #1316

Merged
pedrobaeza merged 1 commit into
OCA:10.0from
hbrunn:10.0-database_cleanup-bulk_purge
Oct 10, 2018
Merged

[IMP] purge uninstalled unavailable modules in bulk#1316
pedrobaeza merged 1 commit into
OCA:10.0from
hbrunn:10.0-database_cleanup-bulk_purge

Conversation

@hbrunn

@hbrunn hbrunn commented Jul 17, 2018

Copy link
Copy Markdown
Member

without this, you'll have to wait unnecessarily long for the wizard to start in case there are a lot of uninstallable modules to purge, because purging causes a full registry reload, which costs a lot of time. Doing it in bulk will cause only one registry reload for all modules.

@hbrunn hbrunn added this to the 10.0 milestone Jul 17, 2018
@api.model
def find(self):
res = []
purge_lines = self.env['cleanup.purge.line.module']

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.

Is it worth adding .browse() for clarity (empty recordset)?
👍 I have experienced slow processes when cleaning databases, maybe it was the cause.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I used to add the .browse([]), but meanwhile I see this used as idiom for an empty recordset very often, so if you don't insist, I'd like to keep it this way

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.

I don't, it was a coding-style question!

@CasVissers-360ERP CasVissers-360ERP left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM functional test

@pedrobaeza
pedrobaeza merged commit 6c6e022 into OCA:10.0 Oct 10, 2018
SiesslPhillip pushed a commit to grueneerde/OCA-server-tools that referenced this pull request Nov 20, 2024
Syncing from upstream OCA/server-tools (8.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants