Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve cron install script not in bin/setup #420

Closed
seanjeanc opened this issue Mar 1, 2021 · 9 comments
Closed

Resolve cron install script not in bin/setup #420

seanjeanc opened this issue Mar 1, 2021 · 9 comments
Assignees
Labels

Comments

@seanjeanc
Copy link

seanjeanc commented Mar 1, 2021

Description

There's an issue with bulk updating the inventory for several products at once. I think it's related to the message queue and perhaps because it's running in the docker container?

I have tried installing and running cron via command line e.g. bin/magento cron:run ( to run cron as per magento 2 docs), I have also tried "bin/magento queue:consumer:start product_action_attribute.update" but this process is just stuck.

Steps To Reproduce

  1. Select the checkboxes for the products you wish you to update, and Select "Actions" -> "Update attributes" and then add Inventory e.g. 199, Set Manage Stock to "Yes" and set "In Stock" to Yes

Expected Result
Bulk update should work.

Actual Result
But I only see the message that it has been sent to the queue, but don't get any sort of confirmation of completion.

@seanjeanc seanjeanc changed the title issue in magento 2.4.2 (docker container) issue in magento 2.4.2 (docker container) mass updating inventory Mar 1, 2021
@seanjeanc
Copy link
Author

I found an interesting link with a solution for 2.4.0 and 2.4.1, and mentions that the bug has been resolved in 2.4.2, but there must be some other issue related to the fact that it's running in a container? Can anyone confirm their bulk updates is working?

https://magento.stackexchange.com/questions/328831/magento2-issue-with-bulk-actions-update-not-started

@markshust
Copy link
Owner

Thank you for the report, I'll check this out shortly.

@seanjeanc
Copy link
Author

hi @markshust hope you're well... you managed to check this bug out? any recommended solution?

@seanjeanc
Copy link
Author

can anyone confirm if the same issue is happening on their end? :)

@markshust
Copy link
Owner

Sorry I haven't checked this out yet, but haven't had reports from anyone else that this wasn't working. Can someone else confirm?

@mirabon
Copy link

mirabon commented Jul 25, 2021

Doesn't work because cron isn't executing, even after this fix #125

@markshust
Copy link
Owner

Have you tried enabling the Cron within the Docker containers? Note it has to be uncommented in these two places:

https://github.com/markshust/docker-magento/blob/master/compose/docker-compose.yml#L59-L66

https://github.com/markshust/docker-magento/blob/master/compose/docker-compose.dev.yml#L41-L42

Then, you must run bin/restart for the changes to take effect. This should enable the Cron.

If it still isn't working, we'll need to confirm if:

  • The process is being called, and/or
  • The process is being completed

We know the latter is failing, but not sure if the process is called in the first place, or if the script is timing out someplace.

@markshust
Copy link
Owner

@seanjeanc I found out that 2.4.0 introduced a new way of setting up the cron installer script https://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html#create-the-commerce-crontab

Unfortunately, I have not worked with any cron-related tasks, so I wasn't aware of this issue and missed it in the 2.4.0 update. I just pushed an update to remove the existing cron tasks.

I'm currently on an underpowered Mac Air, so Docker builds are very pokey. My main laptop should be back in a few days, so I can take care of this then. That said, I also applied to DockerHub's open source application process to get approval back for automated builds, as I believe that recently went away for me which makes building all of these images remotely a possibility.

In the mean time, you can get the cron working by running:

bin/magento cron:install

Then, enable the cron in docker-compose.yml using the steps from the previous comment.

@markshust markshust self-assigned this Aug 31, 2021
@markshust markshust added the task label Aug 31, 2021
@markshust markshust changed the title issue in magento 2.4.2 (docker container) mass updating inventory Resolve cron install script not in bin/setup Sep 17, 2021
@markshust
Copy link
Owner

Fixed, released and tagged in 39.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants