[why] -l means lftp lftp is just one of the clients, "download results" should use more clear and descriptive name.
Signed-off-by: Li Ping 1477412247@qq.com --- lib/monitor.rb | 6 +++--- sbin/submit | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/monitor.rb b/lib/monitor.rb index 9091c92a9..45f720f20 100755 --- a/lib/monitor.rb +++ b/lib/monitor.rb @@ -96,7 +96,7 @@ class Monitor end
def set_result_root(data) - return unless @action['lftp_result'] + return unless @action['mirror_result'] return unless data['log']
data = JSON.parse(data['log']) @@ -113,7 +113,7 @@ class Monitor system "lftp -c mirror #{url} >/dev/null 2>&1" end
- def lftp(data) + def result(data) if @result_root lftp_mirror else @@ -163,7 +163,7 @@ class Monitor
output(data) connect(data, ws) - lftp(data) + result(data)
stop(data, ws) if @action['stop'] end diff --git a/sbin/submit b/sbin/submit index e8b176489..a6f0cd387 100755 --- a/sbin/submit +++ b/sbin/submit @@ -52,8 +52,8 @@ options = OptionParser.new do |opts| actions << 'connect' end
- opts.on('-l', '--lftp', 'lftp mirror job result') do - actions << 'lftp_result' + opts.on('-r', '--result', 'mirror job result dir') do + actions << 'mirror_result' end
opts.on('-m', '--monitor', "monitor job status: use -m 'KEY: VALUE' to add rule") do