Class: DockerSync::WatchStrategy::Unison
- Inherits:
-
Object
- Object
- DockerSync::WatchStrategy::Unison
show all
- Includes:
- Execution
- Defined in:
- lib/docker-sync/watch_strategy/unison.rb
Instance Method Summary
collapse
Methods included from Execution
#fork_exec, #thread_exec, #with_time
Constructor Details
#initialize(sync_name, options) ⇒ Unison
Returns a new instance of Unison.
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/docker-sync/watch_strategy/unison.rb', line 14
def initialize(sync_name, options)
@options = options
@sync_name = sync_name
@watch_fork = nil
@unison = DockerSync::SyncStrategy::Unison.new(@sync_name, @options)
end
|
Instance Method Details
#clean ⇒ Object
37
38
|
# File 'lib/docker-sync/watch_strategy/unison.rb', line 37
def clean
end
|
#run ⇒ Object
25
26
27
|
# File 'lib/docker-sync/watch_strategy/unison.rb', line 25
def run
@watch_fork = @unison.watch
end
|
#stop ⇒ Object
29
30
31
32
33
34
35
|
# File 'lib/docker-sync/watch_strategy/unison.rb', line 29
def stop
if @watch_fork
Process.kill 'TERM', @watch_fork
Process.wait @watch_fork
end
end
|
#watch ⇒ Object
40
41
|
# File 'lib/docker-sync/watch_strategy/unison.rb', line 40
def watch
end
|
#watch_fork ⇒ Object
46
47
48
|
# File 'lib/docker-sync/watch_strategy/unison.rb', line 46
def watch_fork
return @watch_fork
end
|
#watch_options ⇒ Object
43
44
|
# File 'lib/docker-sync/watch_strategy/unison.rb', line 43
def watch_options
end
|
#watch_thread ⇒ Object
50
51
52
|
# File 'lib/docker-sync/watch_strategy/unison.rb', line 50
def watch_thread
return nil
end
|