Skip to content

Fix presentation of the Queue in the Recurring Jobs page #41

Open
Fryguy wants to merge 1 commit into
mattyr:mainfrom
Fryguy:fix_recurring_jobs_queue
Open

Fix presentation of the Queue in the Recurring Jobs page #41
Fryguy wants to merge 1 commit into
mattyr:mainfrom
Fryguy:fix_recurring_jobs_queue

Conversation

@Fryguy

@Fryguy Fryguy commented Aug 5, 2022

Copy link
Copy Markdown
Contributor

Fixes #38

Built on top of #39 so I could actually test the fix via the web interface. EDIT: This was merged elsewhere

Before:
_DEVELOPMENT__Sidekiq

After:
_DEVELOPMENT__Sidekiq

@Fryguy
Fryguy force-pushed the fix_recurring_jobs_queue branch 3 times, most recently from 7c66168 to 937f0e1 Compare August 5, 2022 21:53
@mattyr

mattyr commented Nov 5, 2023

Copy link
Copy Markdown
Owner

mind rebasing this against main?

@Fryguy
Fryguy force-pushed the fix_recurring_jobs_queue branch from 937f0e1 to 69de50a Compare November 6, 2023 14:38
@Fryguy

Fryguy commented Nov 6, 2023

Copy link
Copy Markdown
Contributor Author

Rebased - There are a handful of CI failures, but they all seem related to timeouts to Redis

Comment thread lib/sidecloq/web.rb
@job_specs.each_value do |job_spec|
job_spec['cron'] ||= job_spec['every']

job_spec['queue'] ||= begin

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if this should be in the from_hash function in the Schedule class, so that this behavior is consistent even outside of this view?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(i'm also wondering if we need to also support ActiveJob's queue_as

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly? However, this code explicitly calls from_redis, so it appears to be redis specific to begin with (not sure why, just noting the observation)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, true. but makes me think this logic should be in the schedule class... iow -- there seems to be some manipulation of the state of the schedule before display, such as the queue, so that logic either is duplicated somewhere or what's being displayed isn't matching what's actually being done (like the queue). (one other option is that i just haven't had enough ☕ )

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the change to refactor into the from_hash method might be a bit out of my depth as I'm not as familiar with the code base. I'm wondering if it makes sense to merge this PR as is, since it fixes the problem, and then a follow up could be done to refactor into from_hash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong queue shown in the UI if not defined in config

2 participants