Fix the logging logic in hook_cron

Created on 31 May 2024, 28 days ago

Problem/Motivation

In the hook_cron implementation the following code is called inside foreach loop for every cron_migration entity:

    if (!$import) {
      $logger->notice('No migrations to import.');
    }

See https://git.drupalcode.org/project/migrate_queue_importer/-/blob/2.1.x/m...

So if no migrations were queued, you can see more than a single "No migrations to import." message in logs.

Steps to reproduce

Proposed resolution

Move the mentioned above code block outside the foreach loop.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine pingwin4eg Zaporizhia πŸ‡ΊπŸ‡¦

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024