Skip to main content

The migrate process saves the status of each running migration in the database.  Any error in the code will abnormally terminate the process so the database won't be updated properly and will keep saying that "something is still running".   In Drupal I had a look through the error log and came across the following message:

Migration icon_migrate_species_json is busy with another operation: Importing

However, this shouldn't be the situation and I had no scripts running.  Now if you want to check what is running then use drush migrate:status

drush migrate:status

Which will output something like:

-------------------------------- ---------- ------- -------------- ---------------- ------------- ---------------------

Migration ID                     Status     Total   Imported       Needing update   Unprocessed   Last Imported      

-------------------------------- ---------- ------- -------------- ---------------- ------------- ---------------------

 icon_migrate_product_json       Idle       2766    2447 (88.5%)   0                2             2021-05-18 06:22:58

 icon_migrate_product_type_json  Idle       N/A     58             N/A              N/A           2021-05-18 04:18:38

 icon_migrate_project_json       Idle       4042    3617 (89.5%)   0                425           2021-05-18 04:49:14

 icon_migrate_species_json       Importing  4888    4888 (100%)    4888             0             2021-05-18 04:11:27

-------------------------------- ---------- ------- -------------- ---------------- ------------- ---------------------

Cross check that there is no process running that shouldn't be running.  If you have identified what is running run migrate-reset-status with the name of the task.  Using the output above, icon_migrate_species_json is showing a status of importing and yet I know that is not the case.  In this instance I need to reset the status.

drush migrate-reset-status {name}

Using the above status output, I want to reset icon_migrate_species_json

drush migrate-reset-status icon_migrate_species_json

Running this command you will get a response such as 

 [success] Migration icon_migrate_species_json reset to Idle

 

Other Drush options

migrate-fields-source
migrate-import
migrate-messages
migrate-reset-status
migrate-rollback
migrate-status
migrate-stop
migrate:fields-source
migrate:import
migrate:messages
migrate:reset-status
migrate:rollback
migrate:status
migrate:stop

To see a complete list of Drush migrate commands go to the drush commands docs.

Related articles

Andrew Fletcher16 Jan 2025
get IP address from terminal OSX
When troubleshooting network issues or configuring devices, knowing your IP address can be essential. Whether you're connected via Wi-Fi, Ethernet, or tethering through a mobile provider, macOS offers powerful built-in tools to quickly identify your IP address. Here's a practical guide tailored to...