Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Fryguy
Copy link
Contributor

@Fryguy Fryguy commented Aug 5, 2022

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
Copy link
Owner

mattyr commented Nov 5, 2023

mind rebasing this against main?

@Fryguy
Copy link
Contributor Author

Fryguy commented Nov 6, 2023

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

@job_specs.each_value do |job_spec|
job_spec['cron'] ||= job_spec['every']

job_spec['queue'] ||= begin
Copy link
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
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
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
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
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