forked from CGM_Public/pretix_original
Run exporters in repeatable read by default (Z#23173095) (#5500)
* Run exporters in repeatable read by default (Z#23173095) * Update src/pretix/helpers/database.py Co-authored-by: Richard Schreiber <schreiber@rami.io> * Rename parameter, add test * Do not run during tests --------- Co-authored-by: Richard Schreiber <schreiber@rami.io>
This commit is contained in:
@@ -105,6 +105,18 @@ class BaseExporter:
|
||||
"""
|
||||
return False
|
||||
|
||||
@property
|
||||
def repeatable_read(self) -> bool:
|
||||
"""
|
||||
If ``True``, this exporter will be run in a REPEATABLE READ transaction. This ensures consistent results for
|
||||
all queries performed by the exporter, but creates a performance burden on the database server. We recommend to
|
||||
disable this for exporters that take very long to run and do not rely on this behavior, such as export of lists
|
||||
to CSV files.
|
||||
|
||||
Defaults to ``True`` for now, but default may change in future versions.
|
||||
"""
|
||||
return True
|
||||
|
||||
@property
|
||||
def identifier(self) -> str:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user