请教一下,sidekiq 信息里出现大量失败任务:
ActiveRecord::RecordNotFound: Couldn't find Account with 'id'=-99
是怎么回事……
我好像在 postgresql 里手动删了 id 为 -99 的帐号,大概和这个有关?有办法回复吗?🤦🏼♂️
@dimlau RAILS_ENV=production bundle exec rails c
> Account.where(domain: nil, id: -99).destroy_all
@mashiro 当然这都是db文件夹里那个文件里写的,我是完全都不会的
小白用户感觉好难
@dimlau 你那个-99本身真的就太诡异了23333
@dimlau 不知道你的web界面URL上输入-99这个ID会怎么样
@mashiro 之前删掉之后访问过这个账号页面。
其他不存在的账号是一个大象图片底下一句话类似「The page you are looking for isn't here.」
而删掉之后,这个账号页面会显示源码。
@mashiro 至于这个账号的作用,妳可以看看这里:
@dimlau 哈原来如此,确实删不得
@mashiro
不是,我可能没表达清楚,我之前删了之后,出了问题——sidekiq 里面出现一大堆报错。可见这个-99账号是有必要存在的。所以应该再给它加回来:
RAILS_ENV=production bundle exec rails c
> Account.create!(id: -99, actor_type: 'Application', locked: true, username: Rails.configuration.x.local_domain)
😅