Skip to content

Callback mode#3

Open
sundbry wants to merge 2 commits intomasterfrom
callback
Open

Callback mode#3
sundbry wants to merge 2 commits intomasterfrom
callback

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