mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-13 07:53:16 +00:00
Rename import procedure method name
This commit is contained in:
@@ -67,7 +67,9 @@ class Import extends Command
|
|||||||
$handler = new CommandHandler($this);
|
$handler = new CommandHandler($this);
|
||||||
$monolog->pushHandler($handler);
|
$monolog->pushHandler($handler);
|
||||||
|
|
||||||
$result = ImportProcedure::run($job);
|
$result = ImportProcedure::runImport($job);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int $index
|
* @var int $index
|
||||||
|
@@ -306,7 +306,7 @@ class ImportController extends Controller
|
|||||||
public function start(ImportJob $job)
|
public function start(ImportJob $job)
|
||||||
{
|
{
|
||||||
if ($job->status == "settings_complete") {
|
if ($job->status == "settings_complete") {
|
||||||
ImportProcedure::run($job);
|
$journals = ImportProcedure::runImport($job);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -23,13 +23,40 @@ use Illuminate\Support\Collection;
|
|||||||
*/
|
*/
|
||||||
class ImportProcedure
|
class ImportProcedure
|
||||||
{
|
{
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * @param ImportJob $job
|
||||||
|
// * @param Collection $journals
|
||||||
|
// */
|
||||||
|
// public static function runRules(ImportJob $job, Collection $journals)
|
||||||
|
// {
|
||||||
|
// // get all rules for user.
|
||||||
|
// $rules
|
||||||
|
// = Rule::distinct()
|
||||||
|
// ->where('user_id', $job->user->id)
|
||||||
|
// ->leftJoin('rule_groups', 'rule_groups.id', '=', 'rules.rule_group_id')
|
||||||
|
// ->leftJoin('rule_triggers', 'rules.id', '=', 'rule_triggers.rule_id')
|
||||||
|
// ->where('rule_groups.active', 1)
|
||||||
|
// ->where('rule_triggers.trigger_type', 'user_action')
|
||||||
|
// ->where('rule_triggers.trigger_value', 'store-journal')
|
||||||
|
// ->where('rules.active', 1)
|
||||||
|
// ->orderBy('rule_groups.order', 'ASC')
|
||||||
|
// ->orderBy('rules.order', 'ASC')
|
||||||
|
// ->get(['rules.*']);
|
||||||
|
//
|
||||||
|
// // execute rules on each transaction.
|
||||||
|
// /** @var TransactionJournal $journal */
|
||||||
|
// foreach($journals as $journal) {
|
||||||
|
// self::applyRules($rules, $journal);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param ImportJob $job
|
* @param ImportJob $job
|
||||||
*
|
*
|
||||||
* @return Collection
|
* @return Collection
|
||||||
*/
|
*/
|
||||||
public static function run(ImportJob $job): Collection
|
public static function runImport(ImportJob $job): Collection
|
||||||
{
|
{
|
||||||
// update job to say we started.
|
// update job to say we started.
|
||||||
$job->status = 'import_running';
|
$job->status = 'import_running';
|
||||||
|
Reference in New Issue
Block a user