clockwork_web 0.0.5 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of clockwork_web might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/CHANGELOG.md +9 -1
- data/LICENSE.txt +1 -1
- data/README.md +1 -5
- data/app/controllers/clockwork_web/home_controller.rb +3 -2
- data/lib/clockwork_web.rb +3 -2
- data/lib/clockwork_web/engine.rb +1 -1
- data/lib/clockwork_web/version.rb +1 -1
- metadata +28 -21
- data/.gitignore +0 -14
- data/Gemfile +0 -4
- data/Rakefile +0 -2
- data/clockwork_web.gemspec +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: cb4507656be51be5803d15951b721188e59f5e6bc509d53746029c4b599f3482
|
4
|
+
data.tar.gz: a904897c40fc10a1cf053b00ac28fd2e9c7b8a546428df7e90e8ce8228b61df2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e2a303c738ef6ede0a87b0a2c56baa6f0e0d5239d8131a21778ac223682d48502157f07e4df88e17e7070df4782250e477b83112aac88b132e52f59e750ab2a
|
7
|
+
data.tar.gz: 7bbfb873995d0c30698573a719a33b40ddc5e4b3b706528d669fe29146836be8650c469702ef7624682fc5f1f63dd1fc73a3780c36c7fdb5794757a25e347889
|
data/CHANGELOG.md
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -8,7 +8,7 @@ A web interface for Clockwork
|
|
8
8
|
- monitor jobs
|
9
9
|
- disable jobs
|
10
10
|
|
11
|
-
:tangerine: Battle-tested at [Instacart](https://www.instacart.com)
|
11
|
+
:tangerine: Battle-tested at [Instacart](https://www.instacart.com/opensource)
|
12
12
|
|
13
13
|
## Installation
|
14
14
|
|
@@ -70,10 +70,6 @@ Turn off monitoring
|
|
70
70
|
ClockworkWeb.monitor = false
|
71
71
|
```
|
72
72
|
|
73
|
-
## TODO
|
74
|
-
|
75
|
-
- better design
|
76
|
-
|
77
73
|
## History
|
78
74
|
|
79
75
|
View the [changelog](CHANGELOG.md)
|
@@ -24,13 +24,14 @@ module ClockworkWeb
|
|
24
24
|
|
25
25
|
def job
|
26
26
|
job = params[:job]
|
27
|
-
|
27
|
+
enable = params[:enable] == "true"
|
28
|
+
if enable
|
28
29
|
ClockworkWeb.enable(job)
|
29
30
|
else
|
30
31
|
ClockworkWeb.disable(job)
|
31
32
|
end
|
33
|
+
ClockworkWeb.on_job_update.call(job: job, enable: enable, user: try(:current_user)) if ClockworkWeb.on_job_update
|
32
34
|
redirect_to root_path
|
33
35
|
end
|
34
|
-
|
35
36
|
end
|
36
37
|
end
|
data/lib/clockwork_web.rb
CHANGED
@@ -2,7 +2,7 @@ require "clockwork_web/version"
|
|
2
2
|
|
3
3
|
# dependencies
|
4
4
|
require "clockwork"
|
5
|
-
require "safely_block"
|
5
|
+
require "safely_block/core"
|
6
6
|
|
7
7
|
# engine
|
8
8
|
require "clockwork_web/engine"
|
@@ -18,6 +18,7 @@ module ClockworkWeb
|
|
18
18
|
attr_accessor :redis
|
19
19
|
attr_accessor :monitor
|
20
20
|
attr_accessor :running_threshold
|
21
|
+
attr_accessor :on_job_update
|
21
22
|
end
|
22
23
|
self.monitor = true
|
23
24
|
self.running_threshold = 60 # seconds
|
@@ -108,7 +109,7 @@ module Clockwork
|
|
108
109
|
|
109
110
|
on(:before_run) do |event, t|
|
110
111
|
run = true
|
111
|
-
safely do
|
112
|
+
Safely.safely do
|
112
113
|
run = ClockworkWeb.enabled?(event.job)
|
113
114
|
if run
|
114
115
|
ClockworkWeb.set_last_run(event.job)
|
data/lib/clockwork_web/engine.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clockwork_web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clockwork
|
@@ -26,6 +26,20 @@ dependencies:
|
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: safely_block
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.1.1
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.1.1
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: railties
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
45
|
- - ">="
|
@@ -42,47 +56,42 @@ dependencies:
|
|
42
56
|
name: bundler
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
|
-
- - "
|
59
|
+
- - ">="
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
61
|
+
version: '0'
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
|
-
- - "
|
66
|
+
- - ">="
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rake
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- - "
|
73
|
+
- - ">="
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
75
|
+
version: '0'
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
|
-
- - "
|
80
|
+
- - ">="
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
69
|
-
description:
|
70
|
-
email:
|
71
|
-
- andrew@chartkick.com
|
82
|
+
version: '0'
|
83
|
+
description:
|
84
|
+
email: andrew@chartkick.com
|
72
85
|
executables: []
|
73
86
|
extensions: []
|
74
87
|
extra_rdoc_files: []
|
75
88
|
files:
|
76
|
-
- ".gitignore"
|
77
89
|
- CHANGELOG.md
|
78
|
-
- Gemfile
|
79
90
|
- LICENSE.txt
|
80
91
|
- README.md
|
81
|
-
- Rakefile
|
82
92
|
- app/controllers/clockwork_web/home_controller.rb
|
83
93
|
- app/helpers/clockwork_web/home_helper.rb
|
84
94
|
- app/views/clockwork_web/home/index.html.erb
|
85
|
-
- clockwork_web.gemspec
|
86
95
|
- config/routes.rb
|
87
96
|
- lib/clockwork_web.rb
|
88
97
|
- lib/clockwork_web/engine.rb
|
@@ -99,17 +108,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
99
108
|
requirements:
|
100
109
|
- - ">="
|
101
110
|
- !ruby/object:Gem::Version
|
102
|
-
version: '
|
111
|
+
version: '2.4'
|
103
112
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
113
|
requirements:
|
105
114
|
- - ">="
|
106
115
|
- !ruby/object:Gem::Version
|
107
116
|
version: '0'
|
108
117
|
requirements: []
|
109
|
-
|
110
|
-
rubygems_version: 2.4.5
|
118
|
+
rubygems_version: 3.0.3
|
111
119
|
signing_key:
|
112
120
|
specification_version: 4
|
113
121
|
summary: A web interface for Clockwork
|
114
122
|
test_files: []
|
115
|
-
has_rdoc:
|
data/.gitignore
DELETED
data/Gemfile
DELETED
data/Rakefile
DELETED
data/clockwork_web.gemspec
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'clockwork_web/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "clockwork_web"
|
8
|
-
spec.version = ClockworkWeb::VERSION
|
9
|
-
spec.authors = ["Andrew Kane"]
|
10
|
-
spec.email = ["andrew@chartkick.com"]
|
11
|
-
spec.summary = %q{A web interface for Clockwork}
|
12
|
-
spec.description = %q{A web interface for Clockwork}
|
13
|
-
spec.homepage = "https://github.com/ankane/clockwork_web"
|
14
|
-
spec.license = "MIT"
|
15
|
-
|
16
|
-
spec.files = `git ls-files -z`.split("\x0")
|
17
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = ["lib"]
|
20
|
-
|
21
|
-
spec.add_dependency "clockwork"
|
22
|
-
spec.add_dependency "safely_block"
|
23
|
-
|
24
|
-
spec.add_development_dependency "bundler", "~> 1.7"
|
25
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
-
end
|