فشل المهمة: طريقة غير معرفة `cancel_scheduled_job` للوحدة Jobs::Jobs:Module

during Jobs::ProcessPost

I can recreate on command line:

whereas I can successfully reach it by:

Believe it might be related to this:

Contains:

In this context, could it require a leading ::?

إعجاب واحد (1)

Hmm, adding a leading :: would certainly fix it… but it shouldn’t be required :thinking:

Given that the call comes from within ::Jobs::ProcessPost, Ruby should work up the tree. First it’ll look for ::Jobs::ProcessPost::Jobs, then ::Jobs::Jobs, then eventually ::Jobs module.

The error you’re seeing suggests that something is defining ::Jobs::Jobs… which is weird! Taking a look on my development instance:

[1] pry(main)> Jobs::Jobs
=> Jobs::Jobs
[2] pry(main)> Jobs::Jobs.constants
=> [:RemapOldBotImages, :GrantBadges]

:exploding_head:

Looks like these lines in discourse-narrative-bot are causing issues. If I comment them out, it solves the problem.

Good news is that it’s development-only - related to the file paths of the jobs mismatching the names of the modules. Here’s a PR to clean things up:

Thanks for the report @merefield

4 إعجابات

Ah, yes, weird and explains why Production didn’t blow up!

Thanks for speedy response!!

إعجابَين (2)

This topic was automatically closed after 17 hours. New replies are no longer allowed.