Skip to content

Commit

Permalink
Added limit when processing scheduled attempts (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
gromovdmi authored Jul 7, 2020
1 parent bfc44c4 commit 743b82a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions Crontab/ProceedScheduledAttempt.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public function execute()
$this->searchCriteriaBuilder
->addFilter(TransactionAttemptInterface::IS_SCHEDULED, true)
->addFilter(TransactionAttemptInterface::SCHEDULED_AT, $this->dateTime->gmtDate(), 'lteq')
->setPageSize($this->kkmHelper->getConfig('general/retry_limit'))
->create()
)->getItems();

Expand Down
4 changes: 4 additions & 0 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@
<label>Custom Retry Intervals</label>
<comment>Minutes separated by comma. Example: '1,5,15,30,60'</comment>
</field>
<field id="retry_limit" translate="label" type="text" sortOrder="183" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Custom Retry Limit</label>
<comment>Limit when processing scheduled attempts</comment>
</field>
<field id="max_trials" translate="label" type="text" sortOrder="185" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Max trials to resend</label>
</field>
Expand Down
1 change: 1 addition & 0 deletions etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<default_shipping_name>1</default_shipping_name>
<is_use_custom_retry_intervals>1</is_use_custom_retry_intervals>
<retry_intervals>1,5,15,30,60</retry_intervals>
<retry_limit>200</retry_limit>
<max_trials>10</max_trials>
<max_update_trials>10</max_update_trials>
<auto_send_after_invoice>1</auto_send_after_invoice>
Expand Down
3 changes: 2 additions & 1 deletion i18n/ru_RU.csv
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,5 @@ Recalculating Settings (Advanced),Настройки пересчета скид
Apply Discount Algorithm,Применять алгоритм перерасчета скидок
Spread Discount evenly,Размазывать скидку равномерно
Split items allowed,Разделять позицию на 2
Ability to split 1 item to 2 with different prices (if needed),Возможность разделять товарную позицию на 2, если цена не делится с точностью до копеек
Ability to split 1 item to 2 with different prices (if needed),Возможность разделять товарную позицию на 2, если цена не делится с точностью до копеек
"Limit when processing scheduled attempts","Лимит при обработки очередей с задержкой"

0 comments on commit 743b82a

Please sign in to comment.