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

Callback mode #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Callback mode #3

wants to merge 2 commits into from

Conversation

sundbry
Copy link

@sundbry sundbry commented Jun 28, 2020

No description provided.

cb = Proc.new do | success |
@ack_queue.push([delivery.delivery_tag, success])
end
payload = { :payload => payload, :callback => cb }

Choose a reason for hiding this comment

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

confused where the callback is used

Copy link
Author

Choose a reason for hiding this comment

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

over here: https://github.com/chronicled/fluent-plugin-output-graphql/pull/18

Since we are in the same process should be safe to pass a block (callback) around

obviously this is very implementation specific I would not put this code upstream

@sundbry sundbry requested review from ahaensler and tiendatiowa June 28, 2020 20:12
@sundbry
Copy link
Author

sundbry commented Jun 28, 2020

an additional benefit of this callback mode is it will give us NACKS when HTTP requests fail to hasura.

Copy link

@tiendatiowa tiendatiowa left a comment

Choose a reason for hiding this comment

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

The code looks ok, but my ruby knowledge is very limited. Maybe Matt can give the final review and approval.

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.

3 participants