Skip to content

Commit 013d5e3

Browse files
amg-webfarhatahmad
andauthored
delete source tar if transfer is successful only (#973)
* delete source tar if transfer is successful only current script removes tar even if transfer failed. using rsync option we have possibility to remove source in case transfer is successful only. if failed we can transfer failed tars later. * Update scalelite_post_publish.rb --------- Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com> Co-authored-by: Ahmad Farhat <ahmad.farhat@blindsidenetworks.com>
1 parent f2deb3e commit 013d5e3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

bigbluebutton/scalelite_post_publish.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
end
7373

7474
puts("Transferring recording archive to #{spool_dir}")
75-
system('rsync', '--verbose', '--protect-args', *extra_rsync_opts, archive_file, spool_dir) \
75+
system('rsync', '--verbose', '--remove-source-files', '--protect-args', *extra_rsync_opts, archive_file, spool_dir) \
7676
|| raise('Failed to transfer recording archive')
7777

7878
# Delete recording after transfer
@@ -85,6 +85,4 @@
8585
File.write("#{recording_dir}/status/published/#{meeting_id}-sender.done", "Published #{meeting_id}")
8686

8787
puts('Recording transferring to Scalelite ends')
88-
ensure
89-
FileUtils.rm_f(archive_file)
9088
end

0 commit comments

Comments
 (0)