thread_watcher 0.8.1 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -10
- data/lib/thread_watcher/version.rb +1 -1
- data/lib/thread_watcher.rb +2 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 518ac5e363f1485c65ecf1af68447744f4a21926
|
4
|
+
data.tar.gz: 27b45021c0e54d51ed86244d10f6f63304f1ef0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9782bde8b5cad29eb9e59835b82ad8567cd773307ef64d913a6ad131225bb97fe69c47766906dfcba2746a8c7143e4268144aa1d3a18441fca5b722aae8b792
|
7
|
+
data.tar.gz: d37d1689d9dea982d9b6b544e1e1c0968c5efaddea0ef37312314590c9a4f5a8dbcfbfabc47b793842fa5a841f3a391f6fb465eea4d07becfc7b7ab4218535eb
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ Compatible with any ruby version greater or equal than 1.8.7.
|
|
10
10
|
hm, yeah. just add this to your Gemfile:
|
11
11
|
|
12
12
|
```ruby
|
13
|
-
gem 'thread_watcher', '~> 0.
|
13
|
+
gem 'thread_watcher', '~> 0.9.0'
|
14
14
|
```
|
15
15
|
|
16
16
|
And then execute:
|
@@ -48,7 +48,7 @@ Let's say you type something like
|
|
48
48
|
And you want to kill this worker. So just use the process id to kill the thread
|
49
49
|
|
50
50
|
```ruby
|
51
|
-
ThreadWatcher::Monitor.kill 1452333224
|
51
|
+
ThreadWatcher::Monitor.kill! 1452333224
|
52
52
|
```
|
53
53
|
|
54
54
|
Your thread is now killed.
|
@@ -66,7 +66,7 @@ And you get a simple overview like
|
|
66
66
|
|ID |Running? |Runtime in Seconds |Name
|
67
67
|
|1452537945 |true | 177 |Cleaning Jobs
|
68
68
|
|1452538091 |false | 31 |sleeper9
|
69
|
-
|1452538106 |true | 16 |
|
69
|
+
|1452538106 |true | 16 |noname
|
70
70
|
|1452538116 |true | 6 |sleeper50
|
71
71
|
|1452538121 |true | 1 |sleeper30
|
72
72
|
|
@@ -95,13 +95,7 @@ Now, the process won't be killed automaticly when he's done. So you can restart
|
|
95
95
|
ThreadWatcher::Monitor.restart 1452333224
|
96
96
|
```
|
97
97
|
|
98
|
-
|
99
|
-
If you want to kill these process manually then use
|
100
|
-
|
101
|
-
```ruby
|
102
|
-
ThreadWatcher::Monitor.kill! 1452333224
|
103
|
-
```
|
104
|
-
|
98
|
+
You can also kill your process with a keep_alive option by using the `kill!` command.
|
105
99
|
|
106
100
|
|
107
101
|
|
data/lib/thread_watcher.rb
CHANGED
@@ -20,12 +20,9 @@ module ThreadWatcher
|
|
20
20
|
instance.run options, &block
|
21
21
|
end
|
22
22
|
|
23
|
-
def kill id
|
24
|
-
@process_watch.kill id
|
25
|
-
end
|
26
|
-
|
27
23
|
def self.kill id
|
28
|
-
|
24
|
+
warn "[DEPRECATION] `kill` is deprecated. Please use `kill!` instead."
|
25
|
+
instance.kill! id
|
29
26
|
end
|
30
27
|
|
31
28
|
def kill! id
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thread_watcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Starke
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|