jobly 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -3
- data/lib/jobly.rb +1 -0
- data/lib/jobly/log.rb +23 -0
- data/lib/jobly/module_functions.rb +16 -1
- data/lib/jobly/version.rb +1 -1
- metadata +43 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07003ace15aa4c840ba41208aad221fefa13f8aa420e5cada4e4d0211f82115b
|
4
|
+
data.tar.gz: c3d7a471c27da897fde7af6974318dc806d9f925524124d5549a3ce89d70bcfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1486a30f826453fb836d7fb615466b1d725f672278a522db287a3f16ee466a1f8adc46d039f1d6d1926c8bc9601746097c4cb2617d7864430dd0f605b510d8d
|
7
|
+
data.tar.gz: 2322d6386a45a024bad898ae693db5bc2048edb2aae418476f73bc3244979096811a4c8f906b135427b0afd3a16139020dd8706e3baa020c776834778a6be68f
|
data/README.md
CHANGED
@@ -22,9 +22,6 @@ Compact job server with API, CLI, Web UI and a Sidekiq heart.
|
|
22
22
|
|
23
23
|
---
|
24
24
|
|
25
|
-
Follow development progress:
|
26
|
-
[![Waffle.io - Columns and their card count](https://badge.waffle.io/DannyBen/jobly.svg?columns=all&style=flat-square)](https://waffle.io/DannyBen/jobly)
|
27
|
-
|
28
25
|
Installation
|
29
26
|
--------------------------------------------------
|
30
27
|
|
data/lib/jobly.rb
CHANGED
data/lib/jobly/log.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'remote_syslog_logger'
|
2
|
+
require 'uri'
|
3
|
+
|
4
|
+
module Jobly
|
5
|
+
module Log
|
6
|
+
def self.new(target = nil)
|
7
|
+
if !target or target.to_sym == :stdout or target == STDOUT
|
8
|
+
return Logger.new STDOUT
|
9
|
+
end
|
10
|
+
|
11
|
+
unless target.start_with? 'syslog://'
|
12
|
+
return Logger.new target
|
13
|
+
end
|
14
|
+
|
15
|
+
uri = URI target
|
16
|
+
RemoteSyslogLogger.new (uri.host || 'localhost'), (uri.port || 514),
|
17
|
+
local_hostname: uri.user, program: uri.password
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
|
@@ -17,7 +17,7 @@ module Jobly
|
|
17
17
|
redis_url: ENV['JOBLY_REDIS_URL'] || "redis://localhost:6379/0",
|
18
18
|
status_expiration: ENV['JOBLY_STATUS_EXPIRATION']&.to_i || 30,
|
19
19
|
jobs_namespace: ENV['JOBLY_JOBS_NAMESPACE'],
|
20
|
-
|
20
|
+
log: ENV['JOBLY_LOG'],
|
21
21
|
}
|
22
22
|
end
|
23
23
|
|
@@ -43,6 +43,21 @@ module Jobly
|
|
43
43
|
@options ||= default_options.dup
|
44
44
|
end
|
45
45
|
|
46
|
+
def self.logger
|
47
|
+
return nil unless log
|
48
|
+
@logger ||= Log.new log
|
49
|
+
end
|
50
|
+
|
51
|
+
def self.log=(target)
|
52
|
+
options[:log] = target
|
53
|
+
@logger = nil
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.logger=(target)
|
57
|
+
options[:log] = :custom
|
58
|
+
@logger = target
|
59
|
+
end
|
60
|
+
|
46
61
|
def self.full_app_path
|
47
62
|
File.expand_path app_path
|
48
63
|
end
|
data/lib/jobly/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jobly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Ben Shitrit
|
@@ -39,131 +39,145 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.5'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: http
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '4.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '4.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: lp
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '0.1'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '0.1'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: puma
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '3.12'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '3.12'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: rack
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '2.0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '2.0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: remote_syslog_logger
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '1.
|
103
|
+
version: '1.0'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '1.
|
110
|
+
version: '1.0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: requires
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '0.1'
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
124
|
+
version: '0.1'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: sidekiq
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '2
|
131
|
+
version: '5.2'
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '2
|
138
|
+
version: '5.2'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
140
|
+
name: sidekiq-status
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: '
|
145
|
+
version: '1.1'
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: '
|
152
|
+
version: '1.1'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
154
|
+
name: sinatra
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: '0
|
159
|
+
version: '2.0'
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: '0
|
166
|
+
version: '2.0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: sinatra-contrib
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '2.0'
|
174
|
+
type: :runtime
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '2.0'
|
167
181
|
description: Execute background jobs and build tasks on this sidekiq-based job server
|
168
182
|
email: db@dannyben.com
|
169
183
|
executables:
|
@@ -190,6 +204,7 @@ files:
|
|
190
204
|
- lib/jobly/job_extensions/option_accessors.rb
|
191
205
|
- lib/jobly/job_extensions/solo.rb
|
192
206
|
- lib/jobly/jobs.rb
|
207
|
+
- lib/jobly/log.rb
|
193
208
|
- lib/jobly/module_functions.rb
|
194
209
|
- lib/jobly/refinements/argument_converters.rb
|
195
210
|
- lib/jobly/refinements/convert_to_typed.rb
|