quartz 1.2.0 → 1.3.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/VERSION +1 -1
- data/go/quartz/quartz.go +17 -7
- data/quartz.gemspec +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cee4bc1d9d1e28d5ff2118db75428b8aa471cd01f2c118dbca864d4aa0ad9adc
|
4
|
+
data.tar.gz: cf42bc34fe9b295cbe8ecf666f4c59fce05ea29c6731584ff2cbc49f7d42ba0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb6de5857da8b8c9eb68cc93164ef81fedae314f308d0f5cb058c61eaeb95ef04c2c7cbf69e7576494607226f2a8d29ad69fbe2239635260a4aae3582b327661
|
7
|
+
data.tar.gz: b383c700e38ab98fca13994d7de57a19b9a58b646db049a5e4e74f158a9c1a53e251b9aa2f7f644180df4d05caa728a7435eeb6fc32c948ff65f77d0c2082b3c
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.3.0
|
data/go/quartz/quartz.go
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
package quartz
|
2
2
|
|
3
3
|
import (
|
4
|
+
"fmt"
|
4
5
|
"net"
|
5
6
|
"net/rpc"
|
6
7
|
"net/rpc/jsonrpc"
|
@@ -56,13 +57,11 @@ func (q *Quartz) Start() {
|
|
56
57
|
|
57
58
|
// Destroy the socket file when the server is killed.
|
58
59
|
sigc := make(chan os.Signal)
|
59
|
-
signal.Notify(sigc, syscall.SIGTERM)
|
60
|
+
signal.Notify(sigc, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGINT)
|
60
61
|
go func() {
|
61
62
|
<-sigc
|
62
|
-
|
63
|
-
|
64
|
-
panic(err)
|
65
|
-
}
|
63
|
+
listener.Close()
|
64
|
+
os.Remove(socketPath)
|
66
65
|
os.Exit(0)
|
67
66
|
}()
|
68
67
|
|
@@ -74,8 +73,19 @@ func (q *Quartz) Start() {
|
|
74
73
|
if strings.Contains(err.Error(), "use of closed network connection") {
|
75
74
|
return
|
76
75
|
}
|
77
|
-
|
76
|
+
|
77
|
+
fmt.Fprintf(os.Stderr, "error accepting connection: %s", err)
|
78
|
+
continue
|
78
79
|
}
|
79
|
-
|
80
|
+
|
81
|
+
go func() {
|
82
|
+
defer func() {
|
83
|
+
if r := recover(); r != nil {
|
84
|
+
fmt.Fprintf(os.Stderr, "Recovered from panic: %s", r)
|
85
|
+
}
|
86
|
+
}()
|
87
|
+
|
88
|
+
jsonrpc.ServeConn(conn)
|
89
|
+
}()
|
80
90
|
}
|
81
91
|
}
|
data/quartz.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: quartz 1.
|
5
|
+
# stub: quartz 1.3.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "quartz".freeze
|
9
|
-
s.version = "1.
|
9
|
+
s.version = "1.3.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|