rest-ftp-daemon 0.230.2 → 0.230.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 07eb1912cd6810fa2ba2c5a6805801b08f3ea927
4
- data.tar.gz: 24b389a1da29bf8ae6ebff64fdd9f357a630e4ad
3
+ metadata.gz: 3f72c3669b691a64c1051949e27b3c5bef4674da
4
+ data.tar.gz: 5fcab534e9f49e300e496fe87d6a38c4f19f678f
5
5
  SHA512:
6
- metadata.gz: 44841acce2dfb846ba06504d33f1f6a73740fa701fc4d5aa2c7f34660adc78b253468cbac52f2f19762917aee6e77079df132a2a84d1476bcb8b2382b49721a3
7
- data.tar.gz: e179d8cb2172e62b79e6cc06a16403305592ff5362f6996d7a0a704f693e6360549e3db77714efa83ab4d3d2ca777f5c3215cf964757ea6a559da4d0c5ac18c9
6
+ metadata.gz: 0e67365b6601e4f2ae720277283a5474252097a04fc58b728327dcf755a80c39c50b77fde796dc3810a872dccd50f5b7c4f574c719dac37e102d02de91bde239
7
+ data.tar.gz: 1a836471155747b9be417dc4196d1dbcee9abce63502cbe47dc9f9075642ed4fc010e1623350184754b475f7af7fd1579b45c3e16f904f1b71b1647e92af2502
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rest-ftp-daemon (0.230.2)
4
+ rest-ftp-daemon (0.230.3)
5
5
  double-bag-ftps
6
6
  facter
7
7
  get_process_mem
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.2"
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 = "\t"
41
+ LOG_INDENT = "\t"
41
42
 
42
43
 
43
44
  # Notifications
44
45
  NOTIFY_PREFIX = "rftpd"
45
- NOTIFY_USERAGENT = "#{APP_NAME} - #{APP_VER}"
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
- APP_WORKERS = 1
77
+
76
78
 
@@ -60,7 +60,6 @@ module RestFtpDaemon
60
60
 
61
61
  # Read source file size and parameters
62
62
  @notify_after_sec = Settings.transfer.notify_after_sec rescue nil
63
- @chunk_size = DEFAULT_FTP_CHUNK * 1024
64
63
 
65
64
  # Flag current job
66
65
  @queued_at = Time.now
@@ -62,7 +62,7 @@ module RestFtpDaemon
62
62
  headers = {
63
63
  "Content-Type" => "application/json",
64
64
  "Accept" => "application/json",
65
- "User-Agent" => "#{APP_NAME} - #{APP_VER}"
65
+ "User-Agent" => NOTIFY_USERAGENT
66
66
  }
67
67
  data = flags.to_json
68
68
 
@@ -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
- - presented = present job, with: RestFtpDaemon::API::Entities::JobPresenter, hide_params: true
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 || APP_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.2
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-17 00:00:00.000000000 Z
11
+ date: 2015-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler