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

DelayAgent can sort events #3294

Merged
merged 5 commits into from Jul 9, 2023
Merged

DelayAgent can sort events #3294

merged 5 commits into from Jul 9, 2023

Conversation

knu
Copy link
Member

@knu knu commented Jul 5, 2023

I have plans to add more features to DelayAgent, and this is the first one.

It would be more useful if you could buffer a sequence of unordered events for a while and then emit them in a well-organized order.

I'll add the emit_interval option later so your workflow won't get flooded by randomly called webhooks.

@knu knu requested a review from dsander July 5, 2023 04:09
Copy link
Collaborator

@dsander dsander left a comment

Choose a reason for hiding this comment

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

Nice!

@@ -31,8 +31,8 @@ module ClassMethods
def form_configurable(name, *args)
options = args.extract_options!.reverse_merge(roles: [], type: :string)

if args.all? { |arg| arg.is_a?(Symbol) }
options.assert_valid_keys([:type, :roles, :values, :ace, :cache_response])
if args.all?(Symbol)
Copy link
Collaborator

Choose a reason for hiding this comment

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

TIL that this is a thing, thank you 😄

Copy link
Member Author

@knu knu left a comment

Choose a reason for hiding this comment

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

@dsander Thank you for taking a look!

@knu knu merged commit 53d1042 into master Jul 9, 2023
14 checks passed
@knu knu deleted the delay_agent_can_sort_events branch July 9, 2023 23:02
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.

None yet

2 participants