garbageman 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
@@ -0,0 +1,19 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+
4
+ Bundler.require
5
+
6
+ require './app'
7
+ use GarbageMan::Rack::Middleware
8
+
9
+ Thin::Server.add_before_startup_callback do
10
+ EM.add_periodic_timer(0.5) do
11
+ GarbageMan::Collector.instance.collect
12
+ end
13
+ end
14
+
15
+ Thin::Server.add_after_startup_callback do
16
+ GarbageMan::Collector.instance.create_gc_yaml
17
+ end
18
+
19
+ run App
@@ -0,0 +1,84 @@
1
+ worker_processes 4;
2
+ pid /var/run/nginx.pid;
3
+
4
+ events {
5
+ worker_connections 768;
6
+ }
7
+
8
+ http {
9
+
10
+ ##
11
+ # Basic Settings
12
+ ##
13
+
14
+ sendfile on;
15
+ tcp_nopush on;
16
+ tcp_nodelay on;
17
+ keepalive_timeout 60;
18
+ types_hash_max_size 2048;
19
+ server_tokens off;
20
+
21
+ large_client_header_buffers 6 10k;
22
+
23
+ include /opt/local/etc/nginx/mime.types;
24
+ default_type application/octet-stream;
25
+
26
+ ##
27
+ # Logging Settings
28
+ ##
29
+ log_format main '$remote_addr - $remote_user $server_name [$time_local] $request '
30
+ '"$status" $body_bytes_sent "$http_referer" '
31
+ '"$http_user_agent" "$upstream_addr" "$upstream_response_time" "$http_x_forwarded_for" "$http_True_Client_IP"';
32
+
33
+ access_log /var/log/nginx/access.log main;
34
+ error_log /var/log/nginx/error.log;
35
+
36
+ ##
37
+ # Gzip Settings
38
+ ##
39
+
40
+ gzip on;
41
+ gzip_disable "msie6";
42
+
43
+ gzip_vary on;
44
+ gzip_proxied off;
45
+ gzip_comp_level 6;
46
+ gzip_buffers 16 8k;
47
+ gzip_http_version 1.1;
48
+ gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
49
+
50
+ ##
51
+ # Thin Proxy Config
52
+ ##
53
+
54
+ upstream thin_cluster {
55
+ least_conn;
56
+ server unix:/tmp/thin.core.0.sock max_fails=0;
57
+ server unix:/tmp/thin.core.1.sock max_fails=0;
58
+ server unix:/tmp/thin.core.2.sock max_fails=0;
59
+ server unix:/tmp/thin.core.3.sock max_fails=0;
60
+
61
+ # When it is time for the thin to GC it fails the health check which marks the server as down
62
+
63
+ # http://tengine.taobao.org/document/http_upstream_check.html
64
+ check interval=1000 rise=1 fall=1 timeout=500 type=http;
65
+ check_http_send "GET /gc_health_check HTTP/1.0\r\n\r\n";
66
+ check_http_expect_alive http_2xx;
67
+ }
68
+
69
+ server {
70
+ listen 80;
71
+ server_name test.com;
72
+
73
+ root /product/core/current/public;
74
+
75
+ location / {
76
+ proxy_redirect off;
77
+
78
+ if (!-f $request_filename) {
79
+ proxy_pass http://thin_cluster;
80
+ break;
81
+ }
82
+ }
83
+ } #End Thin Proxy Config
84
+ }
data/garbageman.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "garbageman"
8
- s.version = "0.1.4"
8
+ s.version = "0.1.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Doug Youch"]
@@ -25,6 +25,8 @@ Gem::Specification.new do |s|
25
25
  "README.rdoc",
26
26
  "Rakefile",
27
27
  "VERSION",
28
+ "examples/config.ru",
29
+ "examples/nginx.conf",
28
30
  "garbageman.gemspec",
29
31
  "lib/garbageman.rb",
30
32
  "lib/garbageman/collector.rb",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: garbageman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -76,6 +76,8 @@ files:
76
76
  - README.rdoc
77
77
  - Rakefile
78
78
  - VERSION
79
+ - examples/config.ru
80
+ - examples/nginx.conf
79
81
  - garbageman.gemspec
80
82
  - lib/garbageman.rb
81
83
  - lib/garbageman/collector.rb
@@ -100,7 +102,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
100
102
  version: '0'
101
103
  segments:
102
104
  - 0
103
- hash: 875704701779737275
105
+ hash: -4485848182295585686
104
106
  required_rubygems_version: !ruby/object:Gem::Requirement
105
107
  none: false
106
108
  requirements: