tasks_scheduler 0.6.13 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/tasks_scheduler_helper.rb +3 -9
- data/app/models/scheduled_task.rb +2 -2
- data/config/initializers/menus.rb +9 -0
- data/config/locales/en.yml +9 -0
- data/config/locales/pt-BR.yml +9 -0
- data/lib/tasks_scheduler/daemon.rb +1 -1
- data/lib/tasks_scheduler/version.rb +1 -1
- metadata +7 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b913be2e2291cc27208e02af8b31c07d85070b73037c1eea24c1f91f45e63a9
|
4
|
+
data.tar.gz: 2fe374924c6751c1ef33c6c727dea2dfe83dccfd521de2e5a24783691db5d7a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57ddcdd38e84cabcc98419ce1bf8904a0854c43c6d03f3b0edf1c4542dacb52ac0d3367ebd4c714025900a01184d05215cdc23c7cb02683085cfb5dd7a0cce4b
|
7
|
+
data.tar.gz: 9d151d67c6a38040bde4a78f4021adc646890260f56c8f4172a88397b9fa566c624386eb499df80f4e65489d4beffd19666381fae6549124d0601b549359b065
|
@@ -1,12 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module TasksSchedulerHelper
|
4
|
-
NAVBAR_ENTRIES = {
|
5
|
-
tasks_scheduler_daemon: 'tasks_scheduler_daemon',
|
6
|
-
scheduled_tasks: 'scheduled_tasks',
|
7
|
-
tasks_scheduler_status: :status_scheduled_tasks
|
8
|
-
}.freeze
|
9
|
-
|
10
4
|
def tasks_scheduler_navbar
|
11
5
|
tag.navbar do
|
12
6
|
safe_join(tasks_scheduler_navbar_entries.map { |label, path| link_to label, path }, ' | ')
|
@@ -14,8 +8,8 @@ module TasksSchedulerHelper
|
|
14
8
|
end
|
15
9
|
|
16
10
|
def tasks_scheduler_navbar_entries
|
17
|
-
|
18
|
-
|
19
|
-
|
11
|
+
::Rails.application.root_menu.sub(:admin).sub(:tasks_scheduler).children
|
12
|
+
.map { |child| [child.label, child.view_path(self)] }
|
13
|
+
.to_h
|
20
14
|
end
|
21
15
|
end
|
@@ -24,8 +24,8 @@ class ScheduledTask < ActiveRecord::Base
|
|
24
24
|
@timeout ||= begin
|
25
25
|
r = Integer(ENV[DEFAULT_TIMEOUT_ENVVAR_NAME])
|
26
26
|
r.positive? ? r.seconds : DEFAULT_TIMEOUT
|
27
|
-
|
28
|
-
|
27
|
+
rescue ArgumentError, TypeError
|
28
|
+
DEFAULT_TIMEOUT
|
29
29
|
end
|
30
30
|
end
|
31
31
|
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_rails_utils/patches/application'
|
4
|
+
|
5
|
+
::Rails.application.root_menu.group(:admin).group(:tasks_scheduler).within do |g|
|
6
|
+
g.action :tasks_scheduler_daemon
|
7
|
+
g.action :scheduled_tasks
|
8
|
+
g.action :status_scheduled_tasks
|
9
|
+
end
|
data/config/locales/en.yml
CHANGED
@@ -4,6 +4,15 @@ en:
|
|
4
4
|
scheduled_task:
|
5
5
|
one: Scheduled task
|
6
6
|
other: Scheduled tasks
|
7
|
+
eac_rails_utils:
|
8
|
+
menus:
|
9
|
+
root:
|
10
|
+
admin:
|
11
|
+
tasks_scheduler:
|
12
|
+
__self: Tasks scheduler
|
13
|
+
main_app_tasks_scheduler_daemon: Daemon
|
14
|
+
main_app_scheduled_tasks: Tasks
|
15
|
+
main_app_status_scheduled_tasks: Status
|
7
16
|
helpers:
|
8
17
|
label:
|
9
18
|
scheduled_task:
|
data/config/locales/pt-BR.yml
CHANGED
@@ -4,6 +4,15 @@ pt-BR:
|
|
4
4
|
scheduled_task:
|
5
5
|
one: Tarefa agendada
|
6
6
|
other: Tarefas agendadas
|
7
|
+
eac_rails_utils:
|
8
|
+
menus:
|
9
|
+
root:
|
10
|
+
admin:
|
11
|
+
tasks_scheduler:
|
12
|
+
__self: 'Agendador de tarefas'
|
13
|
+
main_app_tasks_scheduler_daemon: Daemon
|
14
|
+
main_app_scheduled_tasks: Tarefas
|
15
|
+
main_app_status_scheduled_tasks: Situação
|
7
16
|
helpers:
|
8
17
|
label:
|
9
18
|
scheduled_task:
|
@@ -11,7 +11,7 @@ module TasksScheduler
|
|
11
11
|
raise "Action not allowed: #{action} (Allowed: #{ACTIONS})" unless ACTIONS.include?(action)
|
12
12
|
|
13
13
|
::TasksScheduler::AppGem.instance.bundle('exec', 'tasks_scheduler', action)
|
14
|
-
|
14
|
+
.envvar(::TasksScheduler::Checker::LOG_ON_FILE_ENV_KEY, '1')
|
15
15
|
end
|
16
16
|
|
17
17
|
def execute(action)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tasks_scheduler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eduardo H. Bogoni
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: avm-eac_ruby_base1
|
@@ -76,14 +76,14 @@ dependencies:
|
|
76
76
|
requirements:
|
77
77
|
- - "~>"
|
78
78
|
- !ruby/object:Gem::Version
|
79
|
-
version: '0.
|
79
|
+
version: '0.22'
|
80
80
|
type: :runtime
|
81
81
|
prerelease: false
|
82
82
|
version_requirements: !ruby/object:Gem::Requirement
|
83
83
|
requirements:
|
84
84
|
- - "~>"
|
85
85
|
- !ruby/object:Gem::Version
|
86
|
-
version: '0.
|
86
|
+
version: '0.22'
|
87
87
|
- !ruby/object:Gem::Dependency
|
88
88
|
name: eac_ruby_utils
|
89
89
|
requirement: !ruby/object:Gem::Requirement
|
@@ -144,20 +144,14 @@ dependencies:
|
|
144
144
|
requirements:
|
145
145
|
- - "~>"
|
146
146
|
- !ruby/object:Gem::Version
|
147
|
-
version:
|
148
|
-
- - ">="
|
149
|
-
- !ruby/object:Gem::Version
|
150
|
-
version: 0.4.1
|
147
|
+
version: 0.7.2
|
151
148
|
type: :development
|
152
149
|
prerelease: false
|
153
150
|
version_requirements: !ruby/object:Gem::Requirement
|
154
151
|
requirements:
|
155
152
|
- - "~>"
|
156
153
|
- !ruby/object:Gem::Version
|
157
|
-
version:
|
158
|
-
- - ">="
|
159
|
-
- !ruby/object:Gem::Version
|
160
|
-
version: 0.4.1
|
154
|
+
version: 0.7.2
|
161
155
|
description:
|
162
156
|
email:
|
163
157
|
- eduardobogoni@gmail.com
|
@@ -196,6 +190,7 @@ files:
|
|
196
190
|
- app/views/tasks_scheduler_daemon/_running_status.html.erb
|
197
191
|
- app/views/tasks_scheduler_daemon/index.html.erb
|
198
192
|
- config/initializers/assets.rb
|
193
|
+
- config/initializers/menus.rb
|
199
194
|
- config/locales/en.yml
|
200
195
|
- config/locales/pt-BR.yml
|
201
196
|
- config/routes.rb
|