# Сбой задания: неопределенный метод \`cancel\_scheduled\_job\` для модуля Jobs::Jobs

**URL:** <https://meta.discourse.org/t/failing-job-undefined-method-cancel-scheduled-job-for-jobs-module/228155>\
**Category:** Development\
**Created:** [26.Май.2022 09:07:07 UTC](https://meta.discourse.org/t/failing-job-undefined-method-cancel-scheduled-job-for-jobs-module/228155 "2022-05-26T09:07:07Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [26.Май.2022 09:07:07 UTC](https://meta.discourse.org/t/failing-job-undefined-method-cancel-scheduled-job-for-jobs-module/228155/1 "2022-05-26T09:07:07Z")

</div>

во время `Jobs::ProcessPost`

Я могу воспроизвести это через командную строку:

 ![image](https://global.discourse-cdn.com/meta/original/4X/0/2/4/02487b9878be0aef44b9f6e0a7c74b4d93905044.jpeg)

в то время как получить к нему доступ успешно можно следующим образом:

 ![image](https://global.discourse-cdn.com/meta/original/4X/c/9/9/c999993ae3cc1e860c4403b8c329e437e61a4928.jpeg)

Полагаю, это может быть связано с этим:

> <https://github.com/discourse/discourse/commit/bf6f8299a781922737fa01c408078f4c090885b6>
>
> Previously, with the default \`editing\_grace\_period\`, hotlinked images were pulle…d 5 minutes after a post is created. This delay was added to reduce the chance of automated edits clashing with user edits.
> 
> This commit refactors things so that we can pull hotlinked images immediately. URLs are immediately updated in the post's \`cooked\` HTML. The post's raw markdown is updated later, after the \`editing\_grace\_period\`.
> 
> This involves a number of behind-the-scenes changes including:
> 
> \- Schedule Jobs::PullHotlinkedImages immediately after Jobs::ProcessPost. Move scheduling to after the \`update\_column\` call to avoid race conditions
> 
> \- Move raw changes into a separate job, which is delayed until after the ninja-edit window
> 
> \- Move disable\_if\_low\_on\_disk\_space logic into the \`pull\_hotlinked\_images\` job
> 
> \- Move raw-parsing/replacing logic into \`InlineUpload\` so it can be easily be shared between \`UpdateHotlinkedRaw\` and \`PullUserProfileHotlinkedImages\`

Содержит:

> <https://github.com/discourse/discourse/blob/bf6f8299a781922737fa01c408078f4c090885b6/app/jobs/regular/process_post.rb#L67>

В данном контексте, не требуется ли здесь ведущий `::`?

---

_[View the full topic](https://meta.discourse.org/t/failing-job-undefined-method-cancel-scheduled-job-for-jobs-module/228155)._
