module DbSucker::Application::SklavenTreiber::Worker::Accessors
Public Instance Methods
app()
click to toggle source
# File lib/db_sucker/application/sklaven_treiber/worker/accessors.rb, line 58 def app sklaventreiber.app end
canceled?()
click to toggle source
# File lib/db_sucker/application/sklaven_treiber/worker/accessors.rb, line 26 def canceled? @state == :canceled end
copy_file_destination(dstfile)
click to toggle source
# File lib/db_sucker/application/sklaven_treiber/worker/accessors.rb, line 90 def copy_file_destination dstfile d, dt = Time.current.strftime("%Y-%m-%d"), Time.current.strftime("%H-%M-%S") File.expand_path dstfile.dup .gsub!(":combined", ":datetime_-_:table") .gsub!(":datetime", "#{d}_#{dt}") .gsub!(":date", d) .gsub!(":time", dt) .gsub!(":table", table) .gsub!(":id", sklaventreiber.trxid) end
deferred?()
click to toggle source
# File lib/db_sucker/application/sklaven_treiber/worker/accessors.rb, line 42 def deferred? @deferred end
descriptive()
click to toggle source
# File lib/db_sucker/application/sklaven_treiber/worker/accessors.rb, line 62 def descriptive "#{ctn.source["database"]}-#{table}" end
done?()
click to toggle source
# File lib/db_sucker/application/sklaven_treiber/worker/accessors.rb, line 10 def done? succeeded? || failed? || canceled? end
failed?()
click to toggle source
# File lib/db_sucker/application/sklaven_treiber/worker/accessors.rb, line 18 def failed? @state == :failed end
identifier()
click to toggle source
# File lib/db_sucker/application/sklaven_treiber/worker/accessors.rb, line 66 def identifier "#{trxid}_table" end
local_tmp_file(file)
click to toggle source
# File lib/db_sucker/application/sklaven_treiber/worker/accessors.rb, line 82 def local_tmp_file file "#{local_tmp_path}/#{file}" end
local_tmp_path()
click to toggle source
# File lib/db_sucker/application/sklaven_treiber/worker/accessors.rb, line 78 def local_tmp_path sklaventreiber.app.core_tmp_path end
paused?()
click to toggle source
# File lib/db_sucker/application/sklaven_treiber/worker/accessors.rb, line 34 def paused? @state == :paused end
pausing?()
click to toggle source
# File lib/db_sucker/application/sklaven_treiber/worker/accessors.rb, line 38 def pausing? @state == :pausing end
pending?()
click to toggle source
# File lib/db_sucker/application/sklaven_treiber/worker/accessors.rb, line 6 def pending? @state == :pending end
running?()
click to toggle source
# File lib/db_sucker/application/sklaven_treiber/worker/accessors.rb, line 30 def running? @state == :running end
spinner_frame()
click to toggle source
# File lib/db_sucker/application/sklaven_treiber/worker/accessors.rb, line 86 def spinner_frame @spinner_frames.unshift(@spinner_frames.pop)[0] end
sshing?()
click to toggle source
# File lib/db_sucker/application/sklaven_treiber/worker/accessors.rb, line 14 def sshing? @sshing end
state()
click to toggle source
# File lib/db_sucker/application/sklaven_treiber/worker/accessors.rb, line 50 def state @state end
status()
click to toggle source
# File lib/db_sucker/application/sklaven_treiber/worker/accessors.rb, line 46 def status @status end
succeeded?()
click to toggle source
# File lib/db_sucker/application/sklaven_treiber/worker/accessors.rb, line 22 def succeeded? @state == :done end
tmp_filename(tmp_suffix = false)
click to toggle source
# File lib/db_sucker/application/sklaven_treiber/worker/accessors.rb, line 74 def tmp_filename tmp_suffix = false "#{ctn.tmp_path}/#{trxid}_#{ctn.source["database"]}_#{table}.dbsc#{".tmp" if tmp_suffix}" end
to_s()
click to toggle source
# File lib/db_sucker/application/sklaven_treiber/worker/accessors.rb, line 70 def to_s "#<#{self.class}:#{self.object_id}-#{descriptive}(#{@state})>" end
trxid()
click to toggle source
# File lib/db_sucker/application/sklaven_treiber/worker/accessors.rb, line 54 def trxid sklaventreiber.trxid end