skiplock 1.0.24 → 1.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a43b01cedd94ea395b0b173e2da3c5c7ab0baf6ccbd35e599127544084ca5589
4
- data.tar.gz: a908c4eea5b2b75727a70fe5efc248f0b0183e9fe97a37c068b185b9f259a4ba
3
+ metadata.gz: 2e920cb349a73036c794a785a955013644642fbe543d1d36605ee20e2db99e99
4
+ data.tar.gz: 9b4d8971fe38e5e13d5378f2781249b77aefd68dc03ab978ef7daa8ccf1b1c5a
5
5
  SHA512:
6
- metadata.gz: c5ae8b9bd79e37426710d707fadd2e4d658e541ffdd109a760687f2c14dacfa9d61614130d25be801264ecee86ea63d54ce4d6604c4cc80c7a47ac31752618f6
7
- data.tar.gz: 42ba6d9047ac028c24389d1915f686f5d553751244bd557a98a8b28af311a53702d6c69078abafcb6696d5d00e441fd8eca43d2e18b11530945fa10a42d15cea
6
+ metadata.gz: 363a9cad645d4e01ae82fd692717bf237b36399049858196cd36df95d6d0acdc86f0c0b0e2fd7dda17a083a9bf5044134466e90baffc87620e125bb1a6c0b856
7
+ data.tar.gz: 6b1af9d83854a982430959bef45dab748f9b8697f35a3a121465f5d0ba484634c12b3744606c89c5009e3cc634f7b8f8481fccb00eccc0aa07a2c5d93b09f5e2
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  It only uses the `LISTEN/NOTIFY/SKIP LOCKED` features provided natively on PostgreSQL 9.5+ to efficiently and reliably dispatch jobs to worker processes and threads ensuring that each job can be completed successfully **only once**. No other polling or timer is needed.
6
6
 
7
- The library is quite small compared to other PostgreSQL job queues (eg. *delay_job*, *queue_classic*, *que*, *good_job*) with less than 500 lines of codes; and it still provides similar set of features and more...
7
+ The library is quite small compared to other PostgreSQL job queues (eg. *delay_job*, *queue_classic*, *que*, *good_job*) with less than 600 lines of codes; and it still provides similar set of features and more...
8
8
 
9
9
  #### Compatibility:
10
10
 
@@ -152,6 +152,8 @@ module Skiplock
152
152
  Rails.logger.reopen('/dev/null') rescue Rails.logger.reopen('NUL') # supports Windows NUL device
153
153
  Rails.logger.level = @logger.level
154
154
  Rails.logger.extend(ActiveSupport::Logger.broadcast(@logger))
155
+ # disable ActionCable logging
156
+ ActionCable.server.config.logger = Logger.new(nil) if defined?(ActionCable)
155
157
  end
156
158
  rescue Exception => ex
157
159
  @logger.error "Exception with logger: #{ex.to_s}"
@@ -159,4 +161,4 @@ module Skiplock
159
161
  Skiplock.on_errors.each { |p| p.call(ex) }
160
162
  end
161
163
  end
162
- end
164
+ end
@@ -1,4 +1,4 @@
1
1
  module Skiplock
2
- VERSION = Version = '1.0.24'
2
+ VERSION = Version = '1.0.25'
3
3
  end
4
4
 
@@ -24,8 +24,7 @@ module Skiplock
24
24
  @running = false
25
25
  @executor.shutdown
26
26
  @executor.kill unless @executor.wait_for_termination(@config[:graceful_shutdown])
27
- ActionCable.server.broadcast('skiplock', { worker: { op: 'DELETE', id: self.id, hostname: self.hostname, master: self.master, capacity: self.capacity, pid: self.pid, sid: self.sid, created_at: self.created_at.to_f, updated_at: self.updated_at.to_f } }) if @config[:actioncable] && defined?(ActionCable)
28
- self.delete
27
+ ActionCable.server.broadcast('skiplock', { worker: { op: 'DELETE', id: self.id, hostname: self.hostname, master: self.master, capacity: self.capacity, pid: self.pid, sid: self.sid, created_at: self.created_at.to_f, updated_at: self.updated_at.to_f } }) if self.delete && @config[:actioncable] && defined?(ActionCable)
29
28
  Skiplock.logger.info "[Skiplock] Shutdown of #{self.master ? 'master' : 'cluster'} worker#{(' ' + @num.to_s) if @num > 0 && @config[:workers] > 2} (PID: #{self.pid}) was completed."
30
29
  end
31
30
 
@@ -143,4 +142,4 @@ module Skiplock
143
142
  end
144
143
  end
145
144
  end
146
- end
145
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skiplock
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.24
4
+ version: 1.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tin Vo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-27 00:00:00.000000000 Z
11
+ date: 2021-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob