mirror of
https://github.com/odoo/runbot.git
synced 2025-03-18 17:05:44 +07:00

The exponential backoff offsets from the write_date of the children PRs, however it doesn't reset, so the offsetting gets bumped up way more than originally expected or designed if the child PRs are under active development for some reason. Fix this by adding a field to specifically record the date of merge of a PR, and check that feature against the backoff offset. This should provide more regular and reliable backoff. Fixes #369
11 lines
355 B
Python
11 lines
355 B
Python
def migrate(cr, version):
|
|
""" Set the merge_date field to the current write_date, and reset
|
|
the backoff to its default so we reprocess old PRs properly.
|
|
"""
|
|
cr.execute("""
|
|
UPDATE runbot_merge_pull_requests
|
|
SET merge_date = write_date,
|
|
reminder_backoff_factor = -4
|
|
WHERE state = 'merged'
|
|
""")
|