litestream 0.10.5-x86_64-darwin → 0.11.0-x86_64-darwin

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: 8b9761ca272865b4a0dbf94ad376b4fd619653e41b4b515f7bb1f6e03ce2f8ef
4
- data.tar.gz: 62e46f537fbef1684d5d0d8df6206afd12d7250b1e37096b1ddb59540efe7f39
3
+ metadata.gz: bbab360a2b53a3c4db0a6283bd42afadc21b696c1ebff1ea9be305c1f292eb2a
4
+ data.tar.gz: 21b43d294c6517eb033cc0009f621226cdedc180bffe1de7123d14ef748abd26
5
5
  SHA512:
6
- metadata.gz: 2902bc040b67936eba6695065aa5b66d9bdea96d0f1d8e227684e0408fa0d8f0b12e2d191e10bc559321283a1e6bc52f55c225a531b1eeb32237cb1675a4a853
7
- data.tar.gz: 717a0fc83682cd9f5337824b226d22d025beaf1457aac1d0e020c7c310699309757c91b6a115c85d7ea753fa6b5460dbb1da1e233bb205e15ee272b6be18fe1d
6
+ metadata.gz: '020704796969169edecc2e259a685c04b32263ce279366a940e38cd47a6260ae74d7993d2fbf8fba7fee5ba8d54e8cc523a8a1922699e640851f7b13ebfda484'
7
+ data.tar.gz: 2271caf46835cd764a3a1f17230d6cd37e6e8da4b03b470137a4ccf348912f631a93785d0fcec3008504e83c41780c3982517b7aaa468fcde26dfa624e04df49
@@ -0,0 +1,13 @@
1
+ require "active_job"
2
+
3
+ module Litestream
4
+ class VerificationJob < ActiveJob::Base
5
+ queue_as Litestream.queue
6
+
7
+ def perform
8
+ Litestream::Commands.databases.each do |db_hash|
9
+ Litestream.verify!(db_hash["path"])
10
+ end
11
+ end
12
+ end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module Litestream
2
- VERSION = "0.10.5"
2
+ VERSION = "0.11.0"
3
3
  end
data/lib/litestream.rb CHANGED
@@ -23,6 +23,7 @@ module Litestream
23
23
 
24
24
  mattr_writer :username
25
25
  mattr_writer :password
26
+ mattr_writer :queue
26
27
 
27
28
  class << self
28
29
  def verify!(database_path)
@@ -51,7 +52,7 @@ module Litestream
51
52
  # use method instead of attr_accessor to ensure
52
53
  # this works if variable set after Litestream is loaded
53
54
  def username
54
- @username ||= ENV["LITESTREAM_USERNAME"] || @@username
55
+ @username ||= ENV["LITESTREAM_USERNAME"] || @@username || "litestream"
55
56
  end
56
57
 
57
58
  # use method instead of attr_accessor to ensure
@@ -60,6 +61,10 @@ module Litestream
60
61
  @password ||= ENV["LITESTREAM_PASSWORD"] || @@password
61
62
  end
62
63
 
64
+ def queue
65
+ @queue ||= ENV["LITESTREAM_QUEUE"] || @@queue || "default"
66
+ end
67
+
63
68
  def replicate_process
64
69
  info = {}
65
70
  if !`which systemctl`.empty?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: litestream
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.5
4
+ version: 0.11.0
5
5
  platform: x86_64-darwin
6
6
  authors:
7
7
  - Stephen Margheim
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-19 00:00:00.000000000 Z
11
+ date: 2024-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logfmt
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: activejob
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rubyzip
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -95,6 +109,7 @@ files:
95
109
  - app/controllers/litestream/application_controller.rb
96
110
  - app/controllers/litestream/processes_controller.rb
97
111
  - app/controllers/litestream/restorations_controller.rb
112
+ - app/jobs/litestream/verification_job.rb
98
113
  - app/views/layouts/litestream/_style.html
99
114
  - app/views/layouts/litestream/application.html.erb
100
115
  - app/views/litestream/processes/show.html.erb