mirror of
https://github.com/pretix/pretix.git
synced 2025-12-11 01:22:28 +00:00
Compare commits
2 Commits
answer-exp
...
loadtest
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
05e9d09e1f | ||
|
|
93947cace0 |
@@ -670,15 +670,15 @@ class CartManager:
|
|||||||
self._check_max_cart_size()
|
self._check_max_cart_size()
|
||||||
self._calculate_expiry()
|
self._calculate_expiry()
|
||||||
|
|
||||||
with self.event.lock() as now_dt:
|
# with self.event.lock() as now_dt:
|
||||||
with transaction.atomic():
|
with transaction.atomic():
|
||||||
self.now_dt = now_dt
|
self.now_dt = now()
|
||||||
self._extend_expiry_of_valid_existing_positions()
|
self._extend_expiry_of_valid_existing_positions()
|
||||||
err = self._delete_out_of_timeframe()
|
err = self._delete_out_of_timeframe()
|
||||||
err = self.extend_expired_positions() or err
|
err = self.extend_expired_positions() or err
|
||||||
err = self._perform_operations() or err
|
err = self._perform_operations() or err
|
||||||
if err:
|
if err:
|
||||||
raise CartError(err)
|
raise CartError(err)
|
||||||
|
|
||||||
|
|
||||||
def update_tax_rates(event: Event, cart_id: str, invoice_address: InvoiceAddress):
|
def update_tax_rates(event: Event, cart_id: str, invoice_address: InvoiceAddress):
|
||||||
|
|||||||
@@ -597,16 +597,16 @@ def _perform_order(event: str, payment_provider: str, position_ids: List[str],
|
|||||||
except InvoiceAddress.DoesNotExist:
|
except InvoiceAddress.DoesNotExist:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
with event.lock() as now_dt:
|
# with event.lock() as now_dt:
|
||||||
positions = list(CartPosition.objects.filter(
|
now_dt = now()
|
||||||
id__in=position_ids).select_related('item', 'variation', 'subevent'))
|
positions = list(CartPosition.objects.filter(id__in=position_ids).select_related('item', 'variation', 'subevent'))
|
||||||
if len(positions) == 0:
|
if len(positions) == 0:
|
||||||
raise OrderError(error_messages['empty'])
|
raise OrderError(error_messages['empty'])
|
||||||
if len(position_ids) != len(positions):
|
if len(position_ids) != len(positions):
|
||||||
raise OrderError(error_messages['internal'])
|
raise OrderError(error_messages['internal'])
|
||||||
_check_positions(event, now_dt, positions, address=addr)
|
_check_positions(event, now_dt, positions, address=addr)
|
||||||
order = _create_order(event, email, positions, now_dt, pprov,
|
order = _create_order(event, email, positions, now_dt, pprov,
|
||||||
locale=locale, address=addr, meta_info=meta_info, sales_channel=sales_channel)
|
locale=locale, address=addr, meta_info=meta_info, sales_channel=sales_channel)
|
||||||
|
|
||||||
invoice = order.invoices.last() # Might be generated by plugin already
|
invoice = order.invoices.last() # Might be generated by plugin already
|
||||||
if event.settings.get('invoice_generate') == 'True' and invoice_qualified(order):
|
if event.settings.get('invoice_generate') == 'True' and invoice_qualified(order):
|
||||||
|
|||||||
@@ -179,6 +179,10 @@ METRICS_PASSPHRASE = config.get('metrics', 'passphrase', fallback="")
|
|||||||
CACHES = {
|
CACHES = {
|
||||||
'default': {
|
'default': {
|
||||||
'BACKEND': 'pretix.helpers.cache.CustomDummyCache',
|
'BACKEND': 'pretix.helpers.cache.CustomDummyCache',
|
||||||
|
},
|
||||||
|
'file': {
|
||||||
|
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
|
||||||
|
'LOCATION': '/tmp/django_cache',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
REAL_CACHE_USED = False
|
REAL_CACHE_USED = False
|
||||||
@@ -489,6 +493,8 @@ COMPRESS_PRECOMPILERS = (
|
|||||||
|
|
||||||
COMPRESS_ENABLED = COMPRESS_OFFLINE = not debug_fallback
|
COMPRESS_ENABLED = COMPRESS_OFFLINE = not debug_fallback
|
||||||
|
|
||||||
|
COMPRESS_CACHE_BACKEND = 'file'
|
||||||
|
|
||||||
COMPRESS_CSS_FILTERS = (
|
COMPRESS_CSS_FILTERS = (
|
||||||
# CssAbsoluteFilter is incredibly slow, especially when dealing with our _flags.scss
|
# CssAbsoluteFilter is incredibly slow, especially when dealing with our _flags.scss
|
||||||
# However, we don't need it if we consequently use the static() function in Sass
|
# However, we don't need it if we consequently use the static() function in Sass
|
||||||
|
|||||||
Reference in New Issue
Block a user