magento 2.4 批量操作日志 一直显示 Not Started Update attributes for * selected products Pending, in queue...

目录

问题说明:

 解决方法:

1、首先确认已经正确配置了Cron

2、配置

3、查看并结束现有 queue:consumers 进程

4、 修改magento_operation表结构operation_key 设置成允许为空(主要步骤)。

1)修改db_schema.xml 文件

2)更新应用

5、验证结果

 6、删除老记录


问题说明:

magento 2.4 BUG   批量修改商品内容后,一直提示  Update attributes for * selected products ,批量操作日志 显示 Not Started 。Pending, in queue... 挂起,队列中......,虽然数据是已经修改了,但是这个提示一直增加无法清除很烦人。

 

 解决方法:

1、首先确认已经正确配置了Cron

crontab -e -uwww  #www改成web的授权用户

看到上面的信息代表Cron配置正确 

如果没有运行 下面的命令进行配置:

bin/magento cron:install

2、配置

查看现有列表

bin/magento queue:consumers:list

打开 <magento目录>/app/etc/env.php

将列表中的任务添加到env.php中配置如下:

    'cron_consumers_runner' => [
        'cron_run' => true,
        'max_messages' => 2000,
        'consumers' => [
            'product_action_attribute.update',
            'product_action_attribute.website.update',
            'exportProcessor',
            'inventory.source.items.cleanup',
            'inventory.mass.update',
            'inventory.reservations.update',
            'inventory.reservations.cleanup',
            'inventory.reservations.updateSalabilityStatus',
            'inventory.indexer.sourceItem',
            'inventory.indexer.stock',
            'media.content.synchronization',
            'media.gallery.synchronization',
            'media.storage.catalog.image.resize',
            'codegeneratorProcessor'
        ]
    ],

3、查看并结束现有 queue:consumers 进程

ps aux | grep -i [c]onsumers
www         2425  0.0  0.0 325620  2788 ?        S    Nov16   0:40 php /magento24/bin/magento queue:consumers:start product_action_attribute.update --single-thread --max-messages=10000
www         2427  0.0  0.0 325620  4688 ?        S    Nov16   0:40 php /magento24/bin/magento queue:consumers:start product_action_attribute.website.update --single-thread --max-messages=10000
www         2429  0.0  0.0 325620  2776 ?        S    Nov16   0:40 php /magento24/bin/magento queue:consumers:start exportProcessor --single-thread --max-messages=10000
www         2431  0.0  0.0 325620  2632 ?        S    Nov16   0:40 php /magento24/bin/magento queue:consumers:start inventory.source.items.cleanup --single-thread --max-messages=10000
www         2433  0.0  0.0 326272  2636 ?        S    Nov16   0:40 php /magento24/bin/magento queue:consumers:start inventory.mass.update --single-thread --max-messages=10000
www         2435  0.0  0.0 325488  2576 ?        S    Nov16   0:40 php /magento24/bin/magento queue:consumers:start inventory.reservations.update --single-thread --max-messages=10000
www         2437  0.0  0.0 325488  2648 ?        S    Nov16   0:40 php /magento24/bin/magento queue:consumers:start inventory.reservations.cleanup --single-thread --max-messages=10000
www         2441  0.0  0.0 325620  2644 ?        S    Nov16   0:40 php /magento24/bin/magento queue:consumers:start inventory.indexer.sourceItem --single-thread --max-messages=10000
www         2443  0.0  0.0 325620  2572 ?        S    Nov16   0:40 php /magento24/bin/magento queue:consumers:start inventory.indexer.stock --single-thread --max-messages=10000
www         2451  0.0  0.0 325488  2812 ?        S    Nov16   0:40 php /magento24/bin/magento queue:consumers:start media.content.synchronization --single-thread --max-messages=10000
www         2453  0.0  0.0 325488  2728 ?        S    Nov16   0:40 php /magento24/bin/magento queue:consumers:start media.gallery.synchronization --single-thread --max-messages=10000
www         2455  0.0  0.0 325488  2564 ?        S    Nov16   0:40 php /magento24/bin/magento queue:consumers:start media.storage.catalog.image.resize --single-thread --max-messages=10000
www         2457  0.0  0.0 325620  2648 ?        S    Nov16   0:40 php /magento24/bin/magento queue:consumers:start codegeneratorProcessor --single-thread --max-messages=10000

 可以看到类似上面的信息

用下面的命令结束进程

kill $(ps aux | grep -i [c]onsumers)     #结束所有进程
bin/magento cron:run                 #重新启动queue:consumers进程

4、 修改magento_operation表结构operation_key 设置成允许为空(主要步骤)。

1)修改db_schema.xml 文件

打开安装目录/vendor/magento/module-asynchronous-operations/etc/db_schema.xml 文件37行,nullable="false" 为 nullable="true"

2)更新应用

bin/magento-cli setup:upgrade
bin/magento-cli setup:di:compile
bin/magento-cli setup:static-content:deploy en_US zh_Hans_CN -f

 

 

 

5、验证结果

批量商品修改,检查状态

 6、删除老记录

打开数据库 删除 magento_bulk 表的内容。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值