mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Made performance settings for testing triggers configurable
This commit is contained in:
parent
7840a5ea49
commit
919187f7fd
@ -18,6 +18,7 @@ use FireflyIII\Models\RuleGroup;
|
|||||||
use FireflyIII\Models\RuleTrigger;
|
use FireflyIII\Models\RuleTrigger;
|
||||||
use FireflyIII\Repositories\Rule\RuleRepositoryInterface;
|
use FireflyIII\Repositories\Rule\RuleRepositoryInterface;
|
||||||
use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
|
use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
|
||||||
|
use FireflyIII\Rules\TransactionMatcher;
|
||||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||||
use Input;
|
use Input;
|
||||||
use Preferences;
|
use Preferences;
|
||||||
@ -25,7 +26,7 @@ use Response;
|
|||||||
use Session;
|
use Session;
|
||||||
use URL;
|
use URL;
|
||||||
use View;
|
use View;
|
||||||
use FireflyIII\Rules\TransactionMatcher;
|
use Config;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class RuleController
|
* Class RuleController
|
||||||
@ -348,9 +349,8 @@ class RuleController extends Controller
|
|||||||
// We start searching for transactions. For performance reasons, there are limits
|
// We start searching for transactions. For performance reasons, there are limits
|
||||||
// to the search: a maximum number of results and a maximum number of transactions
|
// to the search: a maximum number of results and a maximum number of transactions
|
||||||
// to search in
|
// to search in
|
||||||
// TODO: Make these values configurable
|
$maxResults = Config::get('firefly.test-triggers.limit');
|
||||||
$maxResults = 50;
|
$maxTransactionsToSearchIn = Config::get('firefly.test-triggers.max_transactions_to_analyse');
|
||||||
$maxTransactionsToSearchIn = 1000;
|
|
||||||
|
|
||||||
// Dispatch the actual work to a matched object
|
// Dispatch the actual work to a matched object
|
||||||
$matchingTransactions =
|
$matchingTransactions =
|
||||||
|
@ -219,5 +219,11 @@ return [
|
|||||||
'append_description',
|
'append_description',
|
||||||
'prepend_description',
|
'prepend_description',
|
||||||
],
|
],
|
||||||
|
'test-triggers' => [
|
||||||
|
// The maximum number of transactions shown when testing a list of triggers
|
||||||
|
'limit' => 50,
|
||||||
|
|
||||||
|
// The maximum number of transactions to analyse, when testing a list of triggers
|
||||||
|
'max_transactions_to_analyse' => 1000
|
||||||
|
]
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user