sidekiq-staged_push 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +2 -1
- data/CHANGELOG.md +4 -0
- data/Dockerfile +1 -1
- data/Gemfile.lock +110 -68
- data/docker-compose.yml +1 -0
- data/lib/sidekiq/staged_push/client.rb +11 -0
- data/lib/sidekiq/staged_push/version.rb +1 -1
- data/lib/sidekiq/staged_push.rb +3 -2
- data/sidekiq-staged_push.gemspec +1 -1
- metadata +5 -6
- data/lib/sidekiq/staged_push/worker.rb +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '080347a510d699e4ead1a8dbcbc064ec1689243a4d37b0b6b6752ab0d0ee90d5'
|
4
|
+
data.tar.gz: a7dd21190e9b009119211f666ca4b1df00fc4a88f47fca9155f9922f4e9e5c3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 503a5d6aae4fb8b40908b6d6c4df487f15f8b3c4c33fdbe2aa22529bacfa183352ac3225daf59c146429981afbef4720ef61d14ae120df7b5ac6bf217d04be31
|
7
|
+
data.tar.gz: 22a76f0c4cf33dca9665aee08c12666484eebedfb32758b71e6b3a3097e4c9d2e6e7c8ad13654c123d84d3deab24aa7e24e42cecbe4ba2fd3b312be330742c4f
|
data/.github/workflows/main.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Dockerfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,126 +1,168 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sidekiq-staged_push (0.
|
4
|
+
sidekiq-staged_push (0.3.0)
|
5
5
|
activerecord (>= 5.2.0)
|
6
|
-
sidekiq (>= 6.
|
6
|
+
sidekiq (>= 6.5.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actionpack (7.
|
12
|
-
actionview (= 7.
|
13
|
-
activesupport (= 7.
|
14
|
-
|
11
|
+
actionpack (7.1.2)
|
12
|
+
actionview (= 7.1.2)
|
13
|
+
activesupport (= 7.1.2)
|
14
|
+
nokogiri (>= 1.8.5)
|
15
|
+
racc
|
16
|
+
rack (>= 2.2.4)
|
17
|
+
rack-session (>= 1.0.1)
|
15
18
|
rack-test (>= 0.6.3)
|
16
|
-
rails-dom-testing (~> 2.
|
17
|
-
rails-html-sanitizer (~> 1.
|
18
|
-
actionview (7.
|
19
|
-
activesupport (= 7.
|
19
|
+
rails-dom-testing (~> 2.2)
|
20
|
+
rails-html-sanitizer (~> 1.6)
|
21
|
+
actionview (7.1.2)
|
22
|
+
activesupport (= 7.1.2)
|
20
23
|
builder (~> 3.1)
|
21
|
-
erubi (~> 1.
|
22
|
-
rails-dom-testing (~> 2.
|
23
|
-
rails-html-sanitizer (~> 1.
|
24
|
-
activemodel (7.
|
25
|
-
activesupport (= 7.
|
26
|
-
activerecord (7.
|
27
|
-
activemodel (= 7.
|
28
|
-
activesupport (= 7.
|
29
|
-
|
24
|
+
erubi (~> 1.11)
|
25
|
+
rails-dom-testing (~> 2.2)
|
26
|
+
rails-html-sanitizer (~> 1.6)
|
27
|
+
activemodel (7.1.2)
|
28
|
+
activesupport (= 7.1.2)
|
29
|
+
activerecord (7.1.2)
|
30
|
+
activemodel (= 7.1.2)
|
31
|
+
activesupport (= 7.1.2)
|
32
|
+
timeout (>= 0.4.0)
|
33
|
+
activesupport (7.1.2)
|
34
|
+
base64
|
35
|
+
bigdecimal
|
30
36
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
37
|
+
connection_pool (>= 2.2.5)
|
38
|
+
drb
|
31
39
|
i18n (>= 1.6, < 2)
|
32
40
|
minitest (>= 5.1)
|
41
|
+
mutex_m
|
33
42
|
tzinfo (~> 2.0)
|
34
43
|
ast (2.4.2)
|
44
|
+
base64 (0.2.0)
|
45
|
+
bigdecimal (3.1.5)
|
35
46
|
builder (3.2.4)
|
36
|
-
concurrent-ruby (1.2.
|
37
|
-
connection_pool (2.
|
47
|
+
concurrent-ruby (1.2.2)
|
48
|
+
connection_pool (2.4.1)
|
38
49
|
crass (1.0.6)
|
39
|
-
database_cleaner-active_record (2.0
|
50
|
+
database_cleaner-active_record (2.1.0)
|
40
51
|
activerecord (>= 5.a)
|
41
52
|
database_cleaner-core (~> 2.0.0)
|
42
53
|
database_cleaner-core (2.0.1)
|
43
54
|
diff-lcs (1.5.0)
|
55
|
+
drb (2.2.0)
|
56
|
+
ruby2_keywords
|
44
57
|
erubi (1.12.0)
|
45
|
-
i18n (1.
|
58
|
+
i18n (1.14.1)
|
46
59
|
concurrent-ruby (~> 1.0)
|
47
|
-
|
48
|
-
|
60
|
+
io-console (0.7.1)
|
61
|
+
irb (1.11.0)
|
62
|
+
rdoc
|
63
|
+
reline (>= 0.3.8)
|
64
|
+
json (2.7.1)
|
65
|
+
language_server-protocol (3.17.0.3)
|
66
|
+
loofah (2.22.0)
|
49
67
|
crass (~> 1.0.2)
|
50
|
-
nokogiri (>= 1.
|
51
|
-
|
52
|
-
|
53
|
-
nokogiri (1.
|
68
|
+
nokogiri (>= 1.12.0)
|
69
|
+
minitest (5.20.0)
|
70
|
+
mutex_m (0.2.0)
|
71
|
+
nokogiri (1.16.0-x86_64-darwin)
|
54
72
|
racc (~> 1.4)
|
55
|
-
nokogiri (1.
|
73
|
+
nokogiri (1.16.0-x86_64-linux)
|
56
74
|
racc (~> 1.4)
|
57
|
-
parallel (1.
|
58
|
-
parser (3.2.
|
75
|
+
parallel (1.24.0)
|
76
|
+
parser (3.2.2.4)
|
59
77
|
ast (~> 2.4.1)
|
60
|
-
|
61
|
-
|
62
|
-
|
78
|
+
racc
|
79
|
+
psych (5.1.2)
|
80
|
+
stringio
|
81
|
+
racc (1.7.3)
|
82
|
+
rack (3.0.8)
|
83
|
+
rack-session (2.0.0)
|
84
|
+
rack (>= 3.0.0)
|
85
|
+
rack-test (2.1.0)
|
63
86
|
rack (>= 1.3)
|
64
|
-
|
65
|
-
|
87
|
+
rackup (2.1.0)
|
88
|
+
rack (>= 3)
|
89
|
+
webrick (~> 1.8)
|
90
|
+
rails-dom-testing (2.2.0)
|
91
|
+
activesupport (>= 5.0.0)
|
92
|
+
minitest
|
66
93
|
nokogiri (>= 1.6)
|
67
|
-
rails-html-sanitizer (1.
|
68
|
-
loofah (~> 2.
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
94
|
+
rails-html-sanitizer (1.6.0)
|
95
|
+
loofah (~> 2.21)
|
96
|
+
nokogiri (~> 1.14)
|
97
|
+
railties (7.1.2)
|
98
|
+
actionpack (= 7.1.2)
|
99
|
+
activesupport (= 7.1.2)
|
100
|
+
irb
|
101
|
+
rackup (>= 1.0.0)
|
73
102
|
rake (>= 12.2)
|
74
|
-
thor (~> 1.0)
|
75
|
-
zeitwerk (~> 2.
|
103
|
+
thor (~> 1.0, >= 1.2.2)
|
104
|
+
zeitwerk (~> 2.6)
|
76
105
|
rainbow (3.1.1)
|
77
|
-
rake (13.0
|
78
|
-
|
106
|
+
rake (13.1.0)
|
107
|
+
rdoc (6.6.2)
|
108
|
+
psych (>= 4.0.0)
|
109
|
+
redis-client (0.19.1)
|
79
110
|
connection_pool
|
80
|
-
regexp_parser (2.
|
81
|
-
|
111
|
+
regexp_parser (2.8.3)
|
112
|
+
reline (0.4.1)
|
113
|
+
io-console (~> 0.5)
|
114
|
+
rexml (3.2.6)
|
82
115
|
rspec (3.12.0)
|
83
116
|
rspec-core (~> 3.12.0)
|
84
117
|
rspec-expectations (~> 3.12.0)
|
85
118
|
rspec-mocks (~> 3.12.0)
|
86
|
-
rspec-core (3.12.
|
119
|
+
rspec-core (3.12.2)
|
87
120
|
rspec-support (~> 3.12.0)
|
88
|
-
rspec-expectations (3.12.
|
121
|
+
rspec-expectations (3.12.3)
|
89
122
|
diff-lcs (>= 1.2.0, < 2.0)
|
90
123
|
rspec-support (~> 3.12.0)
|
91
|
-
rspec-mocks (3.12.
|
124
|
+
rspec-mocks (3.12.6)
|
92
125
|
diff-lcs (>= 1.2.0, < 2.0)
|
93
126
|
rspec-support (~> 3.12.0)
|
94
|
-
rspec-support (3.12.
|
95
|
-
rubocop (1.
|
127
|
+
rspec-support (3.12.1)
|
128
|
+
rubocop (1.59.0)
|
96
129
|
json (~> 2.3)
|
130
|
+
language_server-protocol (>= 3.17.0)
|
97
131
|
parallel (~> 1.10)
|
98
|
-
parser (>= 3.2.
|
132
|
+
parser (>= 3.2.2.4)
|
99
133
|
rainbow (>= 2.2.2, < 4.0)
|
100
134
|
regexp_parser (>= 1.8, < 3.0)
|
101
135
|
rexml (>= 3.2.5, < 4.0)
|
102
|
-
rubocop-ast (>= 1.
|
136
|
+
rubocop-ast (>= 1.30.0, < 2.0)
|
103
137
|
ruby-progressbar (~> 1.7)
|
104
138
|
unicode-display_width (>= 2.4.0, < 3.0)
|
105
|
-
rubocop-ast (1.
|
106
|
-
parser (>= 3.
|
107
|
-
rubocop-capybara (2.
|
139
|
+
rubocop-ast (1.30.0)
|
140
|
+
parser (>= 3.2.1.0)
|
141
|
+
rubocop-capybara (2.19.0)
|
108
142
|
rubocop (~> 1.41)
|
109
|
-
rubocop-
|
143
|
+
rubocop-factory_bot (2.24.0)
|
110
144
|
rubocop (~> 1.33)
|
145
|
+
rubocop-rspec (2.25.0)
|
146
|
+
rubocop (~> 1.40)
|
111
147
|
rubocop-capybara (~> 2.17)
|
112
|
-
|
113
|
-
|
148
|
+
rubocop-factory_bot (~> 2.22)
|
149
|
+
ruby-progressbar (1.13.0)
|
150
|
+
ruby2_keywords (0.0.5)
|
151
|
+
sidekiq (7.2.0)
|
114
152
|
concurrent-ruby (< 2)
|
115
153
|
connection_pool (>= 2.3.0)
|
116
154
|
rack (>= 2.2.4)
|
117
|
-
redis-client (>= 0.
|
118
|
-
sqlite3 (1.
|
119
|
-
|
120
|
-
|
155
|
+
redis-client (>= 0.14.0)
|
156
|
+
sqlite3 (1.7.0-x86_64-darwin)
|
157
|
+
sqlite3 (1.7.0-x86_64-linux)
|
158
|
+
stringio (3.1.0)
|
159
|
+
thor (1.3.0)
|
160
|
+
timeout (0.4.1)
|
161
|
+
tzinfo (2.0.6)
|
121
162
|
concurrent-ruby (~> 1.0)
|
122
|
-
unicode-display_width (2.
|
123
|
-
|
163
|
+
unicode-display_width (2.5.0)
|
164
|
+
webrick (1.8.1)
|
165
|
+
zeitwerk (2.6.12)
|
124
166
|
|
125
167
|
PLATFORMS
|
126
168
|
x86_64-darwin-21
|
data/docker-compose.yml
CHANGED
@@ -1,13 +1,24 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "sidekiq/client"
|
3
4
|
require "sidekiq/staged_push/staged_job"
|
4
5
|
|
5
6
|
module Sidekiq
|
6
7
|
module StagedPush
|
7
8
|
class Client
|
9
|
+
def initialize(pool: nil, config: nil)
|
10
|
+
@redis_client = Sidekiq::Client.new(pool: pool, config: config)
|
11
|
+
end
|
12
|
+
|
8
13
|
def push(item)
|
9
14
|
StagedJob.create!(payload: item)
|
10
15
|
end
|
16
|
+
|
17
|
+
# Same as for Sidekiq::TransactionAwareClient we don't provide
|
18
|
+
# transactionality for push_bulk.
|
19
|
+
def push_bulk(items)
|
20
|
+
@redis_client.push_bulk(items)
|
21
|
+
end
|
11
22
|
end
|
12
23
|
end
|
13
24
|
end
|
data/lib/sidekiq/staged_push.rb
CHANGED
@@ -2,14 +2,15 @@
|
|
2
2
|
|
3
3
|
require "sidekiq"
|
4
4
|
require "sidekiq/job"
|
5
|
+
require "sidekiq/staged_push/client"
|
5
6
|
require "sidekiq/staged_push/enqueuer"
|
6
|
-
require "sidekiq/staged_push/worker"
|
7
7
|
require "sidekiq/staged_push/version"
|
8
8
|
|
9
9
|
module Sidekiq
|
10
10
|
module StagedPush
|
11
11
|
def self.enable!
|
12
|
-
Sidekiq
|
12
|
+
Sidekiq.default_job_options["client_class"] = Sidekiq::StagedPush::Client
|
13
|
+
Sidekiq::JobUtil::TRANSIENT_ATTRIBUTES << "client_class"
|
13
14
|
|
14
15
|
enqueuer = Enqueuer.new
|
15
16
|
Sidekiq.configure_server do |config|
|
data/sidekiq-staged_push.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-staged_push
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Niedzielski
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 6.
|
33
|
+
version: 6.5.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 6.
|
40
|
+
version: 6.5.0
|
41
41
|
description:
|
42
42
|
email:
|
43
43
|
- adamsunday@gmail.com
|
@@ -69,7 +69,6 @@ files:
|
|
69
69
|
- lib/sidekiq/staged_push/enqueuer/process_batch.rb
|
70
70
|
- lib/sidekiq/staged_push/staged_job.rb
|
71
71
|
- lib/sidekiq/staged_push/version.rb
|
72
|
-
- lib/sidekiq/staged_push/worker.rb
|
73
72
|
- sidekiq-staged_push.gemspec
|
74
73
|
homepage: https://github.com/adamniedzielski/sidekiq-staged_push
|
75
74
|
licenses:
|
@@ -91,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
90
|
- !ruby/object:Gem::Version
|
92
91
|
version: '0'
|
93
92
|
requirements: []
|
94
|
-
rubygems_version: 3.3
|
93
|
+
rubygems_version: 3.5.3
|
95
94
|
signing_key:
|
96
95
|
specification_version: 4
|
97
96
|
summary: Transactional job push for Sidekiq with jobs staged in the database
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "sidekiq/staged_push/client"
|
4
|
-
|
5
|
-
module Sidekiq
|
6
|
-
module StagedPush
|
7
|
-
module Worker
|
8
|
-
module ClassMethods
|
9
|
-
def client_push(item)
|
10
|
-
stringified_item = item.transform_keys(&:to_s)
|
11
|
-
|
12
|
-
Sidekiq::StagedPush::Client.new.push(stringified_item)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|