Category: Console Applications for Yii2

参考网址:https://www.shuijingwanwq.com/2021/04/15/4859/ 。基于 Composer 更新 Yii 2 至最新版本,将 Yii Framework 从 2.0.35 版本升级到 2.0.41.1。./yii 无输出。 0

./yii No output investigation and analysis

浏览量: 0 1. Reference URL:https://www.shuijingwanwq.com/en/2021/04/15/10238/. Updating Yii 2 to the latest version based on Composer, upgrade the Yii Framework from version 2.0.35 to 2.0.41.1. ./yii has no output. as shown in Figure 1 2....

现在需要基于参数 $groupId 的值,来同步此租户下的用户,即需要让此租户排在第一位。才能够满足需求。先销毁 $sortCmcApiGroupIds 中的 $groupId,再插入至开头。打印排序前后的数组。符合预期 0

In Yii 2.0, the console command line, add the implementation of the parameters

浏览量: 0 1, CMCConsoleUser/ActionSync, existing implementation, reference:https://www.shuijingwanwq.com/2020/03/02/3964/, now need to add parameters: tenant ID 2. The parameter will be passed to the action method corresponding to the requested subcommand. Set the default value of...

在 /vendor 目录中搜索:.git,不存在相应的目录。而之前执行命令:composer install。未成功运行。在 /vendor 目录中搜索:.git,存在相应的目录。 0

After adding /vendor to the git repository, docker deploys, the analysis of the upgrade failed

浏览量: 1 1. Edit .gitignore and add /vendor to the git warehouse, as shown in Figure 1 2. Failed to build in Jenkins, check Console output. as shown in Figure 2 3. Docker deployment,...

模拟出 8 条任务。事务ID为 57、58、59、63、64、65、68、69 的同步时间(分钟)分别为:11、12、13、12、11、12、11、12 。事务ID为 57、58、59、63、64、65、68、69 的同步次数分别为:21、22、22、19、17、5、17、17 。事务ID为 57、58、59、63、64、65、68、69 的同步频率分别为:11 * 60 / 21 = 31、12 * 60 / 22 = 33、13 * 60 / 22 = 35、12 * 60 / 19 = 38、11 * 60 / 17 = 39、12 * 60 / 5 = 144、11 * 60 / 17 = 39、12 * 60 / 17 = 42。得出平均值:(31 + 33 + 35 + 38 + 39 + 144 + 39 + 42) / 8 = 50。理论上的计算公式,进一法取整(事务数量 / 5) / 容器数量 * 60。符合预期 0

Deploy and test clusters in Rancher

浏览量: 0 1. In Rancher, clone the existing Docker container channel-pub-api-prev is channel-pub-api-prev-1, channel-pub-api-prev-2, as shown in Figure 1 2. The final 3 containers form a cluster, as shown in Figure 2 3. In...

在 bash sleep 60 秒 的情况下,很难出现并发锁定的情况。或者增加更多的容器,或者提升执行命令行的频率。设置 bash sleep 10 秒。已经出现并发锁定(防止同一个租户下的用户同步同时在多个容器中执行)的情况。当部署为集群时,已经可以保证同一个租户下的用户同步,在某一时间段,仅在 1 个容器中执行。理论上的计算公式,一个租户的同步时间间隔为:4 / 3 * 10 = 13,结果单位为秒。符合设计预期。总结:部署的容器数量不要超过租户的数量,以防止并发锁定的情况过于频繁。 0

In Yii 2.0, the cluster implementation of the console commands, the lock implementation of the Redis model (to ensure that even if multiple servers are running the command line, the tasks run by each server are not repeated to improve the overall processing performance of the command line)

浏览量: 0 1. Docker deployment, the implementation of Crontab (Bash Sleep) based on Supervisor, to reduce memory usage, refer to:https://www.shuijingwanwq.com/2019/10/12/3555/. /console/controllers/cmcConsoleUserController.php 2. Break ends the execution of the current Foreach structure, that is, each...