徽章每天仅授予一次。
是否可以通过命令行安排或强制“立即”执行授予过程?
最简单的方法是访问 /sidekiq/scheduler,查找名称中包含“grant”的作业。您可能需要的是 Jobs::BadgeGrant,但某些徽章有各自的任务。
我检查了 Sidekiq 中未来 24 小时内所有已排期的任务,其中没有任何任务包含 grant token。
它已在生产环境 forum.kozovod.com 中运行。
没错,您的截图中没有显示任何条目。
我刚刚注意到,我的徽章已经很长时间没有更新了。我现在正在重建容器,并在重启后检查任务是否会被调度。
另外,我注意到其中一个自定义 SQL 徽章出现了错误——这是否会导致其他所有徽章都无法正常工作?
理论上不会。
最可能的情况是 Docker 管理器更新出了问题,导致一些 Sidekiq 任务未能加载。希望重建后就能恢复正常。
好的,重建顺利完成。
不过,完成后几分钟内,我在所有 125 多个计划任务中仍未找到任何 grant 令牌。这是否意味着我的配置存在问题?
是的,很可能。/logs 里有错误吗?有什么不寻常的插件吗?
看不出有什么明显的问题。如果你进入控制台并输入 Jobs::BadgeGrant,会发生什么?应该显示如下:
[1] pry(main)>
Jobs::BadgeGrant
=> Jobs::BadgeGrant
您是否安装了可能产生冲突的插件?
以下是已启用的插件——我仅尝试使用流行且受支持的插件:
- git clone https://github.com/discourse/docker_manager.git
- git clone https://github.com/discourse/discourse-data-explorer.git
- git clone https://github.com/discourse/discourse-staff-notes.git
- git clone https://github.com/joebuhlig/discourse-feature-voting.git
- git clone https://github.com/discourse/discourse-checklist.git
- git clone https://github.com/discourse/discourse-cakeday.git
- git clone https://github.com/discourse/discourse-saved-searches.git
- git clone https://github.com/discourse/discourse-canned-replies.git
- git clone https://github.com/discourse/discourse-assign.git
- git clone https://github.com/discourse/discourse-bbcode.git
- git clone https://github.com/angusmcleod/discourse-locations.git
- git clone https://github.com/discourse/discourse-adplugin.git
- git clone https://github.com/angusmcleod/discourse-custom-wizard.git
谢谢。
在调度器下,我现在可以看到以下内容:
- Jobs::GrantNewUserOfTheMonthBadges
- Jobs::GrantAnniversaryBadges
- Jobs::BadgeGrant
所有调度器任务都显示在“周期性任务”部分下。
那么,我点击“触发”按钮并查看结果是否安全?
好的,这样问题就简单多了!
是的,触发按钮是安全的 ![]()
谢谢,正在运行中。
上次花了 10000 秒,所以我明天早上再回来查看。
有没有办法单独处理某个徽章?也许可以通过命令行操作?
10,000 秒确实很多!在 meta 上,只需要 500 秒。也许您某个自定义徽章查询的效率不够高?(这就是为什么我们默认禁用了自定义 SQL 功能)
谢谢,我快速审查了查询并稍作修复,现在耗时仅约 1000 秒。我还在另一个主题中交叉发布了我的 SQL 优化问题。
回到徽章问题——现在已生效,所有徽章均已授予。感谢您的协助和及时回复。



