forkr 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +27 -0
- data/forkr.gemspec +12 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 792ef4385e7d43266984bd7068d5b057d6dab7c2
|
4
|
+
data.tar.gz: 97833ed0afd879331e79200c875e69aa4f5a7c68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5632df6fc33a3808015c2ddb35e144eb75aed92147f5c20c2b46e322a5e2434cbbbd7d4ba82a0b88a0eaf528b4568c4952b581cf56e326ad9600e415f72f0b1
|
7
|
+
data.tar.gz: 547e21ee34d000acf5b3ddeebde52d2ff22c22e626fecdabf5f065f8fc7dd64b431f3d1c67f32769049ca95c7385f121fc1741a853da6e6b6d84a972e0298b6c
|
data/README.md
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# Forkr
|
2
|
+
Forkr is a preforking worker host, shamelessly inspired by unicorn.
|
3
|
+
|
4
|
+
It exists to easily fork and scale ruby programs which aren't rack-based.
|
5
|
+
|
6
|
+
## What Forkr does for you
|
7
|
+
Forker provides a master management process which oversees and restarts your workers for you.
|
8
|
+
|
9
|
+
The Forkr master will respond to the TTIN and TTOU signals and automatically add or remove workers.
|
10
|
+
|
11
|
+
The Forkr master also responds to the standard unix TERM, QUIT, and INT signals, forwarding those to your workers.
|
12
|
+
|
13
|
+
## What you must provide
|
14
|
+
You need to provide a single object, called a Forklet. This object must respond to a single, parameterless method called run.
|
15
|
+
|
16
|
+
Your run method will be invoked after forking - this is the time to close or reopen any file descriptors or the like.
|
17
|
+
|
18
|
+
In your run method, you will need to:
|
19
|
+
* Block the current thread - make sure to do this or Forkr will get confused and continue restarting your workers. It thinks they have died.
|
20
|
+
* Respond properly to the TERM, QUIT, and INT signals
|
21
|
+
|
22
|
+
## How to use it
|
23
|
+
Provided you already have a forklet and a number of workers you want to run (let's say 3) you can start the master simply with:
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
Forkr.new(forklet, 3).run
|
27
|
+
```
|
data/forkr.gemspec
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = 'forkr'
|
3
|
+
s.version = '0.1.4'
|
4
|
+
s.date = '2014-12-03'
|
5
|
+
s.summary = "A pre-forking worker host - shamelessly inspired by unicorn."
|
6
|
+
s.description = "A pre-forking worker host."
|
7
|
+
s.authors = ["Trey Evans"]
|
8
|
+
s.email = 'lewis.r.evans@gmail.com'
|
9
|
+
s.files = ["lib/forkr.rb", "forkr.gemspec", "README.md"]
|
10
|
+
s.homepage = 'https://github.com/TreyE/forkr'
|
11
|
+
s.license = 'MIT'
|
12
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forkr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Trey Evans
|
@@ -16,6 +16,8 @@ executables: []
|
|
16
16
|
extensions: []
|
17
17
|
extra_rdoc_files: []
|
18
18
|
files:
|
19
|
+
- README.md
|
20
|
+
- forkr.gemspec
|
19
21
|
- lib/forkr.rb
|
20
22
|
homepage: https://github.com/TreyE/forkr
|
21
23
|
licenses:
|