rest-ftp-daemon 0.242.0 → 0.242.1
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/Gemfile.lock +1 -1
- data/lib/rest-ftp-daemon/constants.rb +14 -19
- data/lib/rest-ftp-daemon/job.rb +3 -0
- data/lib/rest-ftp-daemon/remote_sftp.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a814100e37f53bb5ca5286c7484f1cabaf2fed7a
|
|
4
|
+
data.tar.gz: 7cf660d4c30ecc0f48bf277c9c2a11280d92d111
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3755d63260e6530f8a2f34148127c9e1384943be2fb00cc6115d8d0df02d1eb324b511d73c0e77a17f29731c3f8b8d6318e0f53c1cf8f80c5521b2f12cb087de
|
|
7
|
+
data.tar.gz: 20e8159b35e3a60f25fda7e2175700f77b887a83a88a9f8e5184bab55a36683bc1cb9f8328e22a22e66cc254b54b1caed3276ddb57f4ae27ffc5741534a04f0f
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Terrific constants
|
|
2
2
|
APP_NAME = "rest-ftp-daemon"
|
|
3
3
|
APP_NICK = "rftpd"
|
|
4
|
-
APP_VER = "0.242.
|
|
4
|
+
APP_VER = "0.242.1"
|
|
5
5
|
|
|
6
6
|
# Provide default config file information
|
|
7
7
|
APP_LIB = File.expand_path File.dirname(__FILE__)
|
|
@@ -19,12 +19,24 @@ You should copy it to the expected location #{DEFAULT_CONFIG_PATH}:
|
|
|
19
19
|
sudo cp #{SAMPLE_CONFIG_FILE} #{DEFAULT_CONFIG_PATH}
|
|
20
20
|
EOD
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
|
|
23
|
+
# Configuration defaults
|
|
24
|
+
DEFAULT_WORKERS = 2
|
|
25
|
+
DEFAULT_WORKER_TIMEOUT = 3600 # 1h
|
|
26
|
+
DEFAULT_SFTP_TIMEOUT = 600 # 10mn
|
|
27
|
+
DEFAULT_FTP_CHUNK = 1024 # 1 MB
|
|
28
|
+
DEFAULT_PAGE_SIZE = 50 # 50 lines
|
|
29
|
+
DEFAULT_RETRY_DELAY = 10 # 10s
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
# Internal job constants
|
|
23
33
|
JOB_RANDOM_LEN = 8
|
|
24
34
|
JOB_IDENT_LEN = 4
|
|
25
35
|
JOB_TEMPFILE_LEN = 8
|
|
26
36
|
JOB_UPDATE_INTERVAL = 1
|
|
27
37
|
|
|
38
|
+
|
|
39
|
+
# Jobs and workers statuses
|
|
28
40
|
JOB_STATUS_UPLOADING = :uploading
|
|
29
41
|
JOB_STATUS_RENAMING = :renaming
|
|
30
42
|
JOB_STATUS_PREPARED = :prepared
|
|
@@ -54,12 +66,10 @@ LOG_FORMAT_PREFIX = "%s %s\t%-#{LOG_PIPE_LEN.to_i}s\t"
|
|
|
54
66
|
LOG_FORMAT_MESSAGE = "%#{-LOG_COL_WID.to_i}s\t%#{-LOG_COL_JID.to_i}s\t%#{-LOG_COL_ID.to_i}s"
|
|
55
67
|
LOG_NEWLINE = "\n"
|
|
56
68
|
LOG_INDENT = "\t"
|
|
57
|
-
|
|
58
69
|
BIND_PORT_TIMEOUT = 3
|
|
59
70
|
BIND_PORT_LOCALHOST = '127.0.0.1'
|
|
60
71
|
|
|
61
72
|
|
|
62
|
-
|
|
63
73
|
# Notifications
|
|
64
74
|
NOTIFY_PREFIX = "rftpd"
|
|
65
75
|
NOTIFY_USERAGENT = "#{APP_NAME}/v#{APP_VER}"
|
|
@@ -83,21 +93,6 @@ DASHBOARD_WORKER_STYLES = {
|
|
|
83
93
|
}
|
|
84
94
|
|
|
85
95
|
|
|
86
|
-
# API server
|
|
87
|
-
# API_LISTEN_HOST = "0.0.0.0"
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
# Configuration defaults
|
|
91
|
-
DEFAULT_WORKER_TIMEOUT = 3600
|
|
92
|
-
DEFAULT_FTP_CHUNK = 1024
|
|
93
|
-
DEFAULT_PAGE_SIZE = 40
|
|
94
|
-
DEFAULT_WORKERS = 2
|
|
95
|
-
DEFAULT_RETRY_DELAY = 10
|
|
96
|
-
|
|
97
|
-
DEFAULT_SFTP_TIMEOUT = 30
|
|
98
|
-
|
|
99
|
-
|
|
100
96
|
# Initialize defaults
|
|
101
97
|
APP_STARTED = Time.now
|
|
102
98
|
APP_LIBS = File.dirname(__FILE__)
|
|
103
|
-
|
data/lib/rest-ftp-daemon/job.rb
CHANGED
|
@@ -148,6 +148,9 @@ module RestFtpDaemon
|
|
|
148
148
|
rescue Net::SFTP::StatusException => exception
|
|
149
149
|
return oops :ended, exception, :sftp_exception
|
|
150
150
|
|
|
151
|
+
rescue Net::SSH::HostKeyMismatch => exception
|
|
152
|
+
return oops :ended, exception, :sftp_key_mismatch
|
|
153
|
+
|
|
151
154
|
rescue Net::SSH::AuthenticationFailed => exception
|
|
152
155
|
return oops :ended, exception, :sftp_auth_failed
|
|
153
156
|
|