sidekiq_publisher 0.3.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28db75bad6526ed4a58488b7bf78a7230238cddc539cb1b515a41d9580df2042
4
- data.tar.gz: 81990ae1b49a8178c0cefeec10fa69ea3ee8d55be063ebc5a665e34a5dd32691
3
+ metadata.gz: 4ae08c0bff2317e539eaaaf8b44f465f79367f1a479f4f1248f8b7571aef60fb
4
+ data.tar.gz: ec7d8c0bc03a976b3347efd70ebc894e0c8a619b0159ec3bef3791c8b47c1117
5
5
  SHA512:
6
- metadata.gz: 5e3975d6d20c40b5ce34b381c5595f40e150309987a77f15f3f8b70d77949cc9b7c183c688dd7dcd24f00064d13178a7b6a9080f6ac0053026b637a8cc12bf39
7
- data.tar.gz: 7c9acc5d584afcc039385edf867cc4362f8cebf89dbaf1e85f7167f6ed3b9a6b5eb341cd3b483ec29c6be2ce1296306371a9dc5b7fefeb1239b3bac5478aba54
6
+ metadata.gz: cb9d1218bf709f5fbbcce6a687ad6ff6ae53cefaa6ecfecf2536b55c6af3cd618e216ac5207fb6ff1d935b375001350702f0745c60bea4cf1302fdcd2f9a4435
7
+ data.tar.gz: 32c95c4dd3e25f524649cb6508950afac248254bd847405219c6d53ed4d3de49fb4b5da5a8dc0c6accf9b7fd94b93de1adba4a42392022d422d14457c518ca87
@@ -0,0 +1,53 @@
1
+ version: "2"
2
+ checks:
3
+ file-lines:
4
+ enabled: false
5
+ method-lines:
6
+ enabled: false
7
+ plugins:
8
+ csslint:
9
+ enabled: true
10
+ duplication:
11
+ enabled: true
12
+ config:
13
+ languages:
14
+ - ruby
15
+ - javascript
16
+ fixme:
17
+ enabled: true
18
+ exclude_patterns:
19
+ - config/
20
+ - db/
21
+ - script/
22
+ - spec/
23
+ - vendor/
24
+ - "**.jpg"
25
+ - "**.png"
26
+ - "**.gif"
27
+ - "**.svg"
28
+ - "**.scss"
29
+ - "**.md"
30
+ - ".rubocop.yml"
31
+ - "Dockerfile"
32
+ - "Capfile"
33
+ - "README.md"
34
+ - "**.erb"
35
+ - "**.jbuilder"
36
+ - "**.rabl"
37
+ - "**.zip"
38
+ - "**.crt"
39
+ - "**.txt"
40
+ - "**.ico"
41
+ - "**.eot"
42
+ - "**.pdf"
43
+ - "**.html"
44
+ - "**.key"
45
+ - "**.docx"
46
+ - "**.fcgi"
47
+ - "**.xml"
48
+ - "**.pem"
49
+ - "**.csr"
50
+ - "**.org"
51
+ - "**.cgi"
52
+ - "**.ru"
53
+ - "**.pptx"
@@ -1,5 +1,8 @@
1
1
  # sidekiq_publisher
2
2
 
3
+ ## v1.0.0
4
+ - No change.
5
+
3
6
  ## v0.3.3
4
7
  - Do not report published count metric if it is nil.
5
8
 
data/README.md CHANGED
@@ -103,6 +103,31 @@ To use the `SidekiqPublisher`, this can be replaced by including
103
103
  `SidekiqPublisher::Worker`. The usual `perform_async`, etc methods will be
104
104
  available on the class but jobs will be staged in the Postgres table.
105
105
 
106
+ ### Tying to a transaction
107
+ To guarantee that your job is enqueued when there's a change to the
108
+ system of record, simply publish it during the transaction
109
+ representing that change. Usually, that can be accomplished by
110
+ publishing in one of the ActiveRecord callbacks that are called
111
+ within-transaction (e.g. `after_save`, but not `after_commit` and its
112
+ derivatives):
113
+
114
+ ```ruby
115
+ class Frob < ApplicationRecord
116
+ after_save do
117
+ MyJob.perform_later id
118
+ end
119
+ end
120
+ ```
121
+
122
+ For considering more complicated situations (e.g. jobs that should be
123
+ guaranteed during specific changes across models), the rails guides on
124
+ [querying](https://guides.rubyonrails.org/active_record_querying.html)
125
+ and
126
+ [callbacks](https://guides.rubyonrails.org/active_record_callbacks.html),
127
+ and the documentation on
128
+ [transactions](https://api.rubyonrails.org/classes/ActiveRecord/Transactions/ClassMethods.html)
129
+ in ActiveRecord are good resources to consult.
130
+
106
131
  ### Running
107
132
 
108
133
  The publisher process that pulls the job data from Postgres and puts them into Redis
@@ -134,4 +159,3 @@ https://github.com/ezcater/sidekiq_publisher.
134
159
 
135
160
  The gem is available as open source under the terms of the
136
161
  [MIT License](http://opensource.org/licenses/MIT).
137
-
@@ -1,6 +1,6 @@
1
1
  # This file was generated by Appraisal
2
2
 
3
- source "https://ezcater.jfrog.io/ezcater/api/gems/ezcater-gem-source"
3
+ source "https://rubygems.org"
4
4
 
5
5
  gem "activejob", "5.1.6"
6
6
  gem "activesupport", "5.1.6"
@@ -1,6 +1,6 @@
1
1
  # This file was generated by Appraisal
2
2
 
3
- source "https://ezcater.jfrog.io/ezcater/api/gems/ezcater-gem-source"
3
+ source "https://rubygems.org"
4
4
 
5
5
  gem "activejob", "5.2.0"
6
6
  gem "activesupport", "5.2.0"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SidekiqPublisher
4
- VERSION = "0.3.3"
4
+ VERSION = "1.0.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq_publisher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ezCater, Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-30 00:00:00.000000000 Z
11
+ date: 2019-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob
@@ -275,6 +275,7 @@ executables: []
275
275
  extensions: []
276
276
  extra_rdoc_files: []
277
277
  files:
278
+ - ".codeclimate.yml"
278
279
  - Appraisals
279
280
  - CHANGELOG.md
280
281
  - Gemfile
@@ -317,7 +318,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
317
318
  version: '0'
318
319
  requirements: []
319
320
  rubyforge_project:
320
- rubygems_version: 2.7.6
321
+ rubygems_version: 2.7.9
321
322
  signing_key:
322
323
  specification_version: 4
323
324
  summary: Publisher for enqueuing jobs to Sidekiq