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

Workers filters #115

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Workers filters #115

wants to merge 10 commits into from

Conversation

Xeitor
Copy link
Contributor

@Xeitor Xeitor commented Apr 10, 2024

Pending

  • filter by hostname
  • filter by name
  • filter by configuration/queues

Closes: #29

@Xeitor Xeitor marked this pull request as draft April 10, 2024 19:10
@Xeitor
Copy link
Contributor Author

Xeitor commented Apr 11, 2024

hey @rosa, hope you are doing great, when you have some time, I would like to hear your thoughts about the configuration/queues filter

I was thinking about making some kind of dynamic form so the user can input many key/value pair of attributes

@Xeitor
Copy link
Contributor Author

Xeitor commented Apr 13, 2024

update: i was checking the solid_queue codebase and seems like workers metadata field can only have polling_interval, queues and thread_pool_size, if that is the case we could add the three of them as different inputs for now

@rosa
Copy link
Member

rosa commented Jun 6, 2024

@Xeitor, I'm so sorry for the huge delay on this one 😳 I've been so busy with other stuff that I had to leave this gem quite unattended for a while, but I'm going to catch up this week.

i was checking the solid_queue codebase and seems like workers metadata field can only have polling_interval, queues and thread_pool_size, if that is the case we could add the three of them as different inputs for now

I think I'd like to keep this as generic as possible, so that we can also build support for resque and other backends easily. I think the only field that makes sense to filter by there is queues.

@Xeitor
Copy link
Contributor Author

Xeitor commented Jun 6, 2024

@rosa no worries!! I guessed you were busy so no problem really :)

@Xeitor
Copy link
Contributor Author

Xeitor commented Jun 12, 2024

@rosa I've just realized the queues filter is a little trickier than I thought

because the metadata is a text attr, we'll not be able to query it from the db, instead we'll have to perform the filter in memory, but I'll need to modify the enumerable logic similar to JobsRelation#perform_each

@Xeitor Xeitor requested a review from rosa August 18, 2024 13:34
@Xeitor Xeitor marked this pull request as ready for review September 13, 2024 16:51
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.

Allow filtering workers by hostname, name or even by configuration/queues
2 participants