- Issue created by @adelgado12
- 🇫🇷France flocondetoile Lyon
Hello. Better to do this at the query level no ?
In the commerce_cart.cron service
protected function getOrderIds($order_type_id, Interval $interval) { $current_date = new DrupalDateTime('now'); $expiration_date = $interval->subtract($current_date); $ids = $this->orderStorage->getQuery() ->condition('type', $order_type_id) ->condition('changed', $expiration_date->getTimestamp(), '<=') ->condition('cart', TRUE) ->range(0, 250) ->accessCheck(FALSE) ->addTag('commerce_cart_expiration') ->execute(); return $ids; }
- 🇫🇷France flocondetoile Lyon
But you need to check the status (as you do in your patch) too juste before deleting it. An order can be locked after being added in the queue expiration
-
jsacksick →
committed d3f7e680 on 3.0.x
Issue #3520671 by adelgado12, flocondetoile, jsacksick: Do not delete...
-
jsacksick →
committed d3f7e680 on 3.0.x
- 🇮🇱Israel jsacksick
Note that as part of 📌 Cart expiration should not use a queue Active , I'll stop removing items fom a queue, but rather delete them right away.
Automatically closed - issue fixed for 2 weeks with no activity.