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

Wrap receiving with custom logic #20

Merged
merged 18 commits into from
Nov 2, 2019
Merged

Wrap receiving with custom logic #20

merged 18 commits into from
Nov 2, 2019

Conversation

0exp
Copy link
Member

@0exp 0exp commented Oct 22, 2019

  • See README.md
  • See CHANGELOG.md

Example (concurrent receiving):

receive 'User', to_table: :users do
   wrap_receiving do |data, receiving|
      id = data.event_data[:id] if data.destroy? 
      id = data.event_data.values.first.first[:id] if data.update? # see README.md :D

      AnyLocking.lock("my-interesting-lock-#{id}", &receiving)
   end
end

@0exp 0exp self-assigned this Oct 22, 2019
@0exp 0exp removed the wip label Oct 28, 2019
@0exp 0exp changed the title [wip] Wrap receiving with custom logic Wrap receiving with custom logic Oct 28, 2019
@0exp 0exp added this to the 0.13.0 milestone Oct 28, 2019
docs/synopsis.md Outdated Show resolved Hide resolved
@0exp 0exp requested a review from tycooon November 1, 2019 15:14
lib/table_sync/event_actions/data_wrapping/destroy.rb Outdated Show resolved Hide resolved
lib/table_sync/event_actions.rb Outdated Show resolved Hide resolved
@0exp 0exp requested a review from tycooon November 1, 2019 15:26
@0exp 0exp merged commit b5271b0 into master Nov 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants