Files
odoo_source/addons/mail/models/__init__.py
T
c5d3a109f5 [REF] ir.autovacuum: declarative garbage collector registration
The ir.autovacuum model purpose is to run several garbage collecting
operations like removing files from the filestore when no attachment
references them anymore.

The precedent strategy to register new garbage collection tasks was to
override the `power_on` method and to imperatively execute a vacuum
cleaning method on a given model. All calls were executed in a single
SQL transaction without any error handling, meaning a single fail during
any call resulted in a complete failure of the entire vacuum cleaning
chain.

We introduce a new `@autovacuum` api decorator, its purpose it to
register garbage collecting methods that will be safely executed in
their own transaction by the vacuum cleaner. In order to ensure this
new strategy is used, we deprecate `power_on` extensions.

By the way, garbage-collecting methods can be quite heavy and we don't
want users to directly call them. We now ensure they are private.

closes odoo/odoo#47842

Task: 2154079
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
Co-authored-by: Olivier Dony <odo@odoo.com>
2020-05-19 13:38:19 +00:00

35 lines
975 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import mail_message_subtype
from . import mail_tracking_value
from . import mail_alias
from . import mail_alias_mixin
from . import mail_followers
from . import mail_notification
from . import mail_render_mixin
from . import mail_message
from . import mail_activity
from . import mail_mail
from . import mail_thread
from . import mail_thread_blacklist
from . import mail_thread_cc
from . import mail_blacklist
from . import mail_channel
from . import mail_template
from . import mail_shortcode
from . import models
from . import res_partner
from . import res_users
from . import res_company
from . import res_config_settings
from . import update
from . import ir_action_act_window
from . import ir_actions
from . import ir_attachment
from . import ir_config_parameter
from . import ir_http
from . import ir_model
from . import ir_model_fields
from . import ir_ui_view