rest-ftp-daemon 0.230.2 → 0.230.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/config.ru +1 -1
- data/lib/rest-ftp-daemon/constants.rb +6 -4
- data/lib/rest-ftp-daemon/job.rb +0 -1
- data/lib/rest-ftp-daemon/notification.rb +1 -1
- data/lib/rest-ftp-daemon/views/dashboard_table.haml +6 -3
- data/lib/rest-ftp-daemon/worker_pool.rb +1 -1
- 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: 3f72c3669b691a64c1051949e27b3c5bef4674da
|
4
|
+
data.tar.gz: 5fcab534e9f49e300e496fe87d6a38c4f19f678f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e67365b6601e4f2ae720277283a5474252097a04fc58b728327dcf755a80c39c50b77fde796dc3810a872dccd50f5b7c4f574c719dac37e102d02de91bde239
|
7
|
+
data.tar.gz: 1a836471155747b9be417dc4196d1dbcee9abce63502cbe47dc9f9075642ed4fc010e1623350184754b475f7af7fd1579b45c3e16f904f1b71b1647e92af2502
|
data/Gemfile.lock
CHANGED
data/config.ru
CHANGED
@@ -25,7 +25,7 @@ end
|
|
25
25
|
GC::Profiler.enable if Settings.newrelic_enabled?
|
26
26
|
|
27
27
|
# Serve static assets
|
28
|
-
use Rack::Static, :urls => ["/css", "/images"], :root => "#{APP_LIBS}/static/"
|
28
|
+
use Rack::Static, :urls => ["/css", "/js", "/images"], :root => "#{APP_LIBS}/static/"
|
29
29
|
|
30
30
|
# Launch the main daemon
|
31
31
|
run RestFtpDaemon::API::Root
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Terrific constants
|
2
2
|
APP_NAME = "rest-ftp-daemon"
|
3
3
|
APP_NICK = "rftpd"
|
4
|
-
APP_VER = "0.230.
|
4
|
+
APP_VER = "0.230.3"
|
5
5
|
|
6
6
|
|
7
7
|
# Jobs and workers
|
@@ -25,6 +25,7 @@ WORKER_STATUS_TIMEOUT = :timeout
|
|
25
25
|
WORKER_STATUS_CRASHED = :crashed
|
26
26
|
WORKER_STATUS_CLEANING = :cleaning
|
27
27
|
|
28
|
+
|
28
29
|
# Logging and startup
|
29
30
|
LOG_PIPE_LEN = 10
|
30
31
|
LOG_COL_WID = 8
|
@@ -37,12 +38,12 @@ LOG_FORMAT_TIME = "%Y-%m-%d %H:%M:%S"
|
|
37
38
|
LOG_FORMAT_PREFIX = "%s %s\t%-#{LOG_PIPE_LEN.to_i}s\t"
|
38
39
|
LOG_FORMAT_MESSAGE = "%#{-LOG_COL_WID.to_i}s\t%#{-LOG_COL_JID.to_i}s\t%#{-LOG_COL_ID.to_i}s"
|
39
40
|
LOG_NEWLINE = "\n"
|
40
|
-
LOG_INDENT
|
41
|
+
LOG_INDENT = "\t"
|
41
42
|
|
42
43
|
|
43
44
|
# Notifications
|
44
45
|
NOTIFY_PREFIX = "rftpd"
|
45
|
-
NOTIFY_USERAGENT = "#{APP_NAME}
|
46
|
+
NOTIFY_USERAGENT = "#{APP_NAME}/v#{APP_VER}"
|
46
47
|
NOTIFY_IDENTIFIER_LEN = 4
|
47
48
|
|
48
49
|
|
@@ -67,10 +68,11 @@ DASHBOARD_WORKER_STYLES = {
|
|
67
68
|
DEFAULT_WORKER_TIMEOUT = 3600
|
68
69
|
DEFAULT_FTP_CHUNK = 512
|
69
70
|
DEFAULT_PAGE_SIZE = 40
|
71
|
+
DEFAULT_WORKERS = 1
|
70
72
|
|
71
73
|
|
72
74
|
# Initialize defaults
|
73
75
|
APP_STARTED = Time.now
|
74
76
|
APP_LIBS = File.dirname(__FILE__)
|
75
|
-
|
77
|
+
|
76
78
|
|
data/lib/rest-ftp-daemon/job.rb
CHANGED
@@ -3,17 +3,17 @@
|
|
3
3
|
- source_count = job.get(:source_count) || 0
|
4
4
|
- source_processed = job.get(:source_processed) || 0
|
5
5
|
- source_current = job.get(:source_current)
|
6
|
-
-
|
6
|
+
- job_presented = entity_representation_for(RestFtpDaemon::API::Entities::JobPresenter, job, {})
|
7
7
|
- bitrate = job.get :transfer_bitrate
|
8
8
|
|
9
|
+
|
9
10
|
- trclass = DASHBOARD_JOB_STYLES[job.status]
|
10
11
|
|
11
12
|
- unless job.error.nil?
|
12
13
|
- trclass = "warning"
|
13
14
|
|
14
15
|
%tr{class: trclass.to_s}
|
15
|
-
|
16
|
-
%td{title: presented.to_json}
|
16
|
+
%td{title: job_presented.to_json}
|
17
17
|
%b= job.id
|
18
18
|
|
19
19
|
%td= job.label
|
@@ -72,3 +72,6 @@
|
|
72
72
|
.label.label-warning.flag.worker-label= job.wid
|
73
73
|
|
74
74
|
|
75
|
+
|
76
|
+
|
77
|
+
|
@@ -51,7 +51,7 @@ module RestFtpDaemon
|
|
51
51
|
|
52
52
|
def create_threads
|
53
53
|
# Read configuration
|
54
|
-
number_threads = (Settings.workers ||
|
54
|
+
number_threads = (Settings.workers || DEFAULT_WORKERS)
|
55
55
|
|
56
56
|
if number_threads < 1
|
57
57
|
log_error "create_threads: one worker is the minimum possible number (#{number_threads} configured)"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rest-ftp-daemon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.230.
|
4
|
+
version: 0.230.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bruno MEDICI
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|