avm-eac_rails_base1 0.8.4 → 0.9.1

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: 69fb04f0fbb74e02d67e21b9e98c3b2f3cfd7156f8942ebf7e513b5f79b4a0ee
4
- data.tar.gz: 29759aff2c70493a0a3a481732e238067160a605dc6de64cb73a96f7f1ecc215
3
+ metadata.gz: 8d35a1b12d44832530794803f2e70220692515fcc3f16c33434a1f884601e1b8
4
+ data.tar.gz: a752ce4e225c1e92229f14fa4c98e9829096bb15c145c2de7f6a1dbe87494c15
5
5
  SHA512:
6
- metadata.gz: f643f98be452d6289d4de13cf0276c78552b60b3154a3ba0a773b26a7f89ec2ed15116ca850c7df47fa6dad38eea9e42e3b29fdca2d4881bc06f4f51e5ebb822
7
- data.tar.gz: 0b5e1358172f7feb3b829f86dadd074192ce09104c059b067980b4180a3c19fb9927a9515c5639d6fb79168311ed35c77d678c07dd7bfcf9a41a1cec33315871
6
+ metadata.gz: b96e1bdfdc10c70d703ee1a938e17da12e0e6544a8aaaf919be616294b7cc7935618d99b926a089783803e6cef16e729ba15d79a86ffb59c72bca5fdb805efab
7
+ data.tar.gz: 64e47ba4d7abdbe5b19a55a28c2f16efc98bbe0f239e66d482ecb1f5dae8b94263f9deb4e56f2f53e43d46826b9e97b928dfe527be48b705743657e19356f239
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'avm/eac_rails_base1/instances/processes/tasks_scheduler'
3
4
  require 'avm/eac_rails_base1/instances/runners'
4
5
  require 'avm/eac_ruby_base1/instances/mixin'
5
6
  require 'avm/eac_ruby_base1/sources/base'
@@ -22,6 +23,11 @@ module Avm
22
23
  super.add_unit('database', database_unit)
23
24
  end
24
25
 
26
+ # @return [Array<Avm::Instances::Process>]
27
+ def processes
28
+ super + [::Avm::EacRailsBase1::Instances::Processes::TasksScheduler.new(self)]
29
+ end
30
+
25
31
  def rake(*args)
26
32
  bundle('exec', 'rake', *args)
27
33
  end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/instances/process'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module EacRailsBase1
8
+ module Instances
9
+ module Processes
10
+ class Daemon < ::Avm::Instances::Process
11
+ acts_as_abstract :command_name, :gem_name
12
+
13
+ # @return [Boolean]
14
+ def available?
15
+ instance.the_gem.gemfile_lock_gem_version(gem_name).present?
16
+ end
17
+
18
+ def disable
19
+ daemon_command(:stop).system!
20
+ end
21
+
22
+ def enable
23
+ daemon_command(:start).system!
24
+ end
25
+
26
+ def enabled?
27
+ daemon_command(:status).execute.fetch(:exit_code).zero?
28
+ end
29
+
30
+ private
31
+
32
+ def daemon_command(action)
33
+ instance.bundle('exec', command_name, action)
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'avm/eac_rails_base1/instances/processes/daemon'
4
+ require 'eac_ruby_utils/core_ext'
5
+
6
+ module Avm
7
+ module EacRailsBase1
8
+ module Instances
9
+ module Processes
10
+ class TasksScheduler < ::Avm::EacRailsBase1::Instances::Processes::Daemon
11
+ GEM_NAME = 'tasks_scheduler'
12
+ COMMAND_NAME = 'tasks_scheduler'
13
+
14
+ # @return [String]
15
+ def command_name
16
+ COMMAND_NAME
17
+ end
18
+
19
+ # @return [String]
20
+ def gem_name
21
+ GEM_NAME
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module EacRailsBase1
7
+ module Instances
8
+ module Processes
9
+ require_sub __FILE__
10
+ end
11
+ end
12
+ end
13
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacRailsBase1
5
- VERSION = '0.8.4'
5
+ VERSION = '0.9.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avm-eac_rails_base1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Put here the authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-09 00:00:00.000000000 Z
11
+ date: 2023-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avm
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.68'
19
+ version: '0.78'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.68'
26
+ version: '0.78'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: avm-eac_ruby_base1
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: '0.30'
34
34
  - - ">="
35
35
  - !ruby/object:Gem::Version
36
- version: 0.30.2
36
+ version: 0.30.3
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
@@ -43,41 +43,47 @@ dependencies:
43
43
  version: '0.30'
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: 0.30.2
46
+ version: 0.30.3
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: avm-eac_webapp_base0
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '0.15'
53
+ version: '0.18'
54
54
  - - ">="
55
55
  - !ruby/object:Gem::Version
56
- version: 0.15.1
56
+ version: 0.18.1
57
57
  type: :runtime
58
58
  prerelease: false
59
59
  version_requirements: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - "~>"
62
62
  - !ruby/object:Gem::Version
63
- version: '0.15'
63
+ version: '0.18'
64
64
  - - ">="
65
65
  - !ruby/object:Gem::Version
66
- version: 0.15.1
66
+ version: 0.18.1
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: eac_ruby_utils
69
69
  requirement: !ruby/object:Gem::Requirement
70
70
  requirements:
71
71
  - - "~>"
72
72
  - !ruby/object:Gem::Version
73
- version: '0.112'
73
+ version: '0.117'
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: 0.117.1
74
77
  type: :runtime
75
78
  prerelease: false
76
79
  version_requirements: !ruby/object:Gem::Requirement
77
80
  requirements:
78
81
  - - "~>"
79
82
  - !ruby/object:Gem::Version
80
- version: '0.112'
83
+ version: '0.117'
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: 0.117.1
81
87
  - !ruby/object:Gem::Dependency
82
88
  name: eac_ruby_gem_support
83
89
  requirement: !ruby/object:Gem::Requirement
@@ -102,6 +108,9 @@ files:
102
108
  - lib/avm/eac_rails_base1/instances.rb
103
109
  - lib/avm/eac_rails_base1/instances/apache_host.rb
104
110
  - lib/avm/eac_rails_base1/instances/base.rb
111
+ - lib/avm/eac_rails_base1/instances/processes.rb
112
+ - lib/avm/eac_rails_base1/instances/processes/daemon.rb
113
+ - lib/avm/eac_rails_base1/instances/processes/tasks_scheduler.rb
105
114
  - lib/avm/eac_rails_base1/instances/runners.rb
106
115
  - lib/avm/eac_rails_base1/instances/runners/bundle.rb
107
116
  - lib/avm/eac_rails_base1/instances/runners/code_runner.rb