게시글에서 AI 봇을 언급했을 때, 봇이 전혀 반응하지 않아서 에러 로그를 확인해 보니 다음과 같은 에러가 표시되었습니다:
Job exception: undefined method `scheduled?' for nil
이전에는 이런 일이 없었고, 설치 환경의 다른 모든 기능은 정상적으로 작동하며, 내 API 계정에도 잔액이 있습니다. 현재 사용 중인 버전은 **3.4.0.beta2-dev (361e954c55)**입니다.
여기 백트레이스가 있습니다:
/var/www/discourse/app/jobs/scheduled/run_problem_checks.rb:19:in `block in execute'
activerecord-7.1.4/lib/active_record/relation/delegation.rb:100:in `each'
activerecord-7.1.4/lib/active_record/relation/delegation.rb:100:in `each'
/var/www/discourse/app/jobs/scheduled/run_problem_checks.rb:18:in `filter_map'
/var/www/discourse/app/jobs/scheduled/run_problem_checks.rb:18:in `execute'
/var/www/discourse/app/jobs/base.rb:322:in `block (2 levels) in perform'
rails_multisite-6.1.0/lib/rails_multisite/connection_management/null_instance.rb:49:in `with_connection'
rails_multisite-6.1.0/lib/rails_multisite/connection_management.rb:21:in `with_connection'
/var/www/discourse/app/jobs/base.rb:309:in `block in perform'
/var/www/discourse/app/jobs/base.rb:305:in `each'
/var/www/discourse/app/jobs/base.rb:305:in `perform'
/var/www/discourse/app/jobs/base.rb:376:in `perform'
mini_scheduler-0.17.0/lib/mini_scheduler/manager.rb:137:in `process_queue'
mini_scheduler-0.17.0/lib/mini_scheduler/manager.rb:77:in `worker_loop'
mini_scheduler-0.17.0/lib/mini_scheduler/manager.rb:63:in `block (2 levels) in ensure_worker_threads'
업데이트: 이제 이 오류가 계속 쌓이는 것 같습니다. 이 오류가 20개나 있고, 오류 로그에 10분 간격으로 나타나고 있습니다.
다시 멘션을 시도했는데, 이번에는 다음과 같은 오류가 발생했습니다:
Job exception: Something has gone wrong. Perhaps this topic was closed or deleted while you were looking at it?
백트레이스는 다음과 같습니다:
Message (2 copies reported)
Job exception: Something has gone wrong. Perhaps this topic was closed or deleted while you were looking at it?
Backtrace
/var/www/discourse/lib/post_creator.rb:238:in `create!'
/var/www/discourse/lib/post_creator.rb:274:in `create!'
/var/www/discourse/plugins/discourse-ai/lib/ai_bot/playground.rb:464:in `reply_to'
/var/www/discourse/plugins/discourse-ai/app/jobs/regular/create_ai_reply.rb:18:in `execute'
/var/www/discourse/app/jobs/base.rb:322:in `block (2 levels) in perform'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rails_multisite-6.1.0/lib/rails_multisite/connection_management/null_instance.rb:49:in `with_connection'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rails_multisite-6.1.0/lib/rails_multisite/connection_management.rb:21:in `with_connection'
/var/www/discourse/app/jobs/base.rb:309:in `block in perform'
/var/www/discourse/app/jobs/base.rb:305:in `each'
/var/www/discourse/app/jobs/base.rb:305:in `perform'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:202:in `execute_job'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:170:in `block (2 levels) in process'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sidekiq-6.5.12/lib/sidekiq/middleware/chain.rb:177:in `block in invoke'
/var/www/discourse/lib/sidekiq/pausable.rb:132:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sidekiq-6.5.12/lib/sidekiq/middleware/chain.rb:179:in `block in invoke'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sidekiq-6.5.12/lib/sidekiq/middleware/chain.rb:182:in `invoke'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:169:in `block in process'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:136:in `block (6 levels) in dispatch'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sidekiq-6.5.12/lib/sidekiq/job_retry.rb:113:in `local'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:135:in `block (5 levels) in dispatch'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sidekiq-6.5.12/lib/sidekiq.rb:44:in `block in <module:Sidekiq>'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:131:in `block (4 levels) in dispatch'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:263:in `stats'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:126:in `block (3 levels) in dispatch'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sidekiq-6.5.12/lib/sidekiq/job_logger.rb:13:in `call'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:125:in `block (2 levels) in dispatch'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sidekiq-6.5.12/lib/sidekiq/job_retry.rb:80:in `global'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:124:in `block in dispatch'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sidekiq-6.5.12/lib/sidekiq/job_logger.rb:39:in `prepare'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:123:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:168:in `process'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:78:in `process_one'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:68:in `run'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sidekiq-6.5.12/lib/sidekiq/component.rb:8:in `watchdog'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/sidekiq-6.5.12/lib/sidekiq/component.rb:17:in `block in safe_thread'
sam
(Sam Saffron)
9월 2, 2024, 2:05오전
3
@random_picker_bot 아직 살아있나요? 1부터 13까지 숫자 하나를 골라주세요
Of course I’m alive, Sam! I’m as lively as a jackrabbit on a pogo stick. Let’s get that random number for you right away!
Random Picker
Picking from ["1-13"], picked: [3]
Oh, I’m very much alive, Sam! And it looks like the cosmic dice have spoken.
The randomly picked number is: 3
Seems like the universe is feeling rather prime today. Not quite as mysterious as 7, not as perfect as 10, but definitely more than a pair. Maybe it’s suggesting you should take a coffee break at 3 o’clock? Or perhaps it’s hinting that good things come in threes. Either way, I hope this random 3 brings you some trivial joy in your day!
sam
(Sam Saffron)
9월 2, 2024, 2:06오전
5
음, 이건 좀 이상하네요. 사용자가 정지되었거나 신뢰도가 낮은 상태일 수도 있나요?
해당 사용자와 동일한 페르소나를 처음부터 만들어보고 그래도 실패하는지 확인해 주실 수 있을까요?
Discourse Ai가 게시물 작성자에서 오류를 올바르게 표시하도록 수정해야 할 것 같습니다. 좀 더 생각해 보겠습니다.
팁 감사합니다.
말씀해 주신 사항들을 확인해 봤는데, 에러는 그대로입니다. 해당 사용자는 신뢰도 4단계이고 정지 상태도 아닙니다.
그러면 그냥 인내심을 갖고 기다려야 하나 봅니다
여러분에게 도움이 될지 확신은 없지만, 모든 것을 완전히 업데이트한 후 Enable Mentions 설정을 비활성화했다가 다시 활성화하고, 새로 열린 주제에서 AI 페르소나를 다시 언급해 보았더니 새로운 오류는 발생하지 않았으며 정상적으로 작동했습니다. 제가 파악한 바로는 문제가 해결된 것으로 보입니다.
하지만 Job exception: undefined method `scheduled?' for nil 오류는 계속 누적되고 있습니다(현재까지 547건).
1개의 좋아요
ted
(Ted Johansson)
9월 6, 2024, 8:56오전
9
이는 문제 검사 트래커는 존재하지만 문제 검사 로직이 더 이상 존재하지 않기 때문에 발생했을 가능성이 가장 높습니다. 이러한 상황이 발생하는 가장 일반적인 원인은 문제 검사를 포함하는 플러그인을 설치한 후 다시 제거하는 것입니다. 그러면 트래커는 남아있지만 검사 로직은 사라지게 됩니다.
해당 문제에 대한 수정 사항은 다음과 같습니다:
main ← dev/clear-trackers-for-uninstalled-checks
merged 02:11AM - 18 Sep 24 UTC
### What is this change?
When running checks, we look to the existing problem… check trackers and try to grab their `ProblemCheck` classes.
In some cases this is no longer in the problem check repository, e.g. when the check was part of a plugin that has been uninstalled.
In the case where the check was scheduled, this would lead to an error in one of the jobs.
### How does this fix it?
This fix has two parts:
1. If a problem check tracker can't find it's `ProblemCheck` class, it destroys itself and any admin notices associated with it. It then returns `nil`.
2. The job that selects which checks to run now accounts for the fact that the `ProblemCheck` class could be `nil`, and filters it out of the run.
Bonus:
- Scheduled checks now honour the `enabled = false` configuration, same as realtime checks.
2개의 좋아요