westfieldlabs / pub_sub Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Be able to supply a suffix for a given queue through configuration.
Right now when using docker, the current user is the same for multiple developers and the messages are colliding. This will enable us to write to different queues based off of individual ENV configuration.
The default could stay the same.
Line 47 in b5150a6
lib/pub_sub/message.rb:24
lib/pub_sub/publisher.rb:35
Depending on the LOG_LEVEL set, it would use that level to do this specific log.
May we log this with a level that makes sense, like DEBUG or INFO?
This gem currently provides the publish_changes_with
method, which can be used, for a given ActiveRecord model, to trigger a pub_sub event on an after_commit
hook.
The after_commit will be fired whenever an action has been performed on a record, whether it was a touch, update, create or even a destroy action.
However, it's not uncommon to find use cases where we want to send a message only if the action performed was a deletion, or on on any action except deletion. As this method makes no distinction on what actions were made, the developer has to write their own callbacks rather than using this API.
This issue suggests an on
option, to be included to the method in question.
Its parameter can be one of those symbols [or array of symbols containing one or more of them]: :create
, :update
, :save
, :destroy
, :touch
.
Usage:
publish_changes_with :destroy_resource, on: :destroy
publish_changes_with :update_resource, on: [:save, :touch]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.