doofinder/doofinder-magento

Feed Status cron message incorrect if no finished_at date set

Closed this issue · 1 comments

In app/code/community/Doofinder/Feed/Block/Settings/Panel/File.php, the getCronMessage() function does not take into account that the cron schedule record might not have a finished_at value (either hasn't finished executing or failed due to some error).

In such circumstances, the admin will show the following message:

Cron was run for the last time at . Taking into account the settings of the step delay option, there might be problems with the cron's configuration.

While this error is technically correct, it's not very user friendly, as it does not show a last executed date. A possibly better approach would be to determine whether the cron schedule record has a valid finished_at value and if it doesn't, assess whether the cron has failed and show a different error message, like:

Cron task registered but has not completed yet. There is a chance that something is wrong with the execution of the cron. Please check the cron errors.

Fixed in v1.8.17, thank you for the suggestion!