mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Rename import procedure method name
This commit is contained in:
		| @@ -67,7 +67,9 @@ class Import extends Command | ||||
|         $handler = new CommandHandler($this); | ||||
|         $monolog->pushHandler($handler); | ||||
|  | ||||
|         $result = ImportProcedure::run($job); | ||||
|         $result = ImportProcedure::runImport($job); | ||||
|  | ||||
|  | ||||
|  | ||||
|         /** | ||||
|          * @var int          $index | ||||
|   | ||||
| @@ -306,7 +306,7 @@ class ImportController extends Controller | ||||
|     public function start(ImportJob $job) | ||||
|     { | ||||
|         if ($job->status == "settings_complete") { | ||||
|             ImportProcedure::run($job); | ||||
|             $journals = ImportProcedure::runImport($job); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -23,13 +23,40 @@ use Illuminate\Support\Collection; | ||||
|  */ | ||||
| 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 | ||||
|      * | ||||
|      * @return Collection | ||||
|      */ | ||||
|     public static function run(ImportJob $job): Collection | ||||
|     public static function runImport(ImportJob $job): Collection | ||||
|     { | ||||
|         // update job to say we started. | ||||
|         $job->status = 'import_running'; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user