module Synco
Nested
Definitions
def self.run_script(*arguments, **options, &block)
Run a prepared backup script using a lockfile.
Implementation
def self.run_script(*arguments, **options, &block)
script = Synco::Script.build(*arguments, **options, &block)
lockfile_path = $0 + ".lock"
# script.on(:failure) do |exception|
# logger.error{exception}
#
# raise
# end
Lockfile.new(lockfile_path, :retries => 0) do
Runner.new(script).call
end
end