workflow_manager 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/wfm_delete_command +19 -0
- data/lib/workflow_manager/cluster.rb +17 -0
- data/lib/workflow_manager/server.rb +3 -0
- data/lib/workflow_manager/version.rb +1 -1
- metadata +4 -2
@@ -0,0 +1,19 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: utf-8
|
3
|
+
# 20121112 masa workflow manager client
|
4
|
+
Version = '20141030-154828'
|
5
|
+
|
6
|
+
require 'drb/drb'
|
7
|
+
require 'workflow_manager/optparse_ex'
|
8
|
+
|
9
|
+
opt = OptionParser.new do |o|
|
10
|
+
o.banner = "Usage:\n #{File.basename(__FILE__)} [option]"
|
11
|
+
o.on(:target, nil, '-f file', '--file', 'File/Dir path')
|
12
|
+
o.on(:server, 'druby://localhost:12345', '-d server', '--server', 'workflow manager URI (default: druby://localhost:12345)')
|
13
|
+
o.parse!(ARGV)
|
14
|
+
end
|
15
|
+
|
16
|
+
uri = opt.server||'druby://localhost:12345'
|
17
|
+
|
18
|
+
workflow_manager = DRbObject.new_with_uri(uri)
|
19
|
+
puts workflow_manager.delete_command(opt.target)
|
@@ -30,6 +30,8 @@ module WorkflowManager
|
|
30
30
|
end
|
31
31
|
def kill_command(job_id)
|
32
32
|
end
|
33
|
+
def delete_command(target)
|
34
|
+
end
|
33
35
|
end
|
34
36
|
|
35
37
|
class LocalComputer < Cluster
|
@@ -74,6 +76,9 @@ module WorkflowManager
|
|
74
76
|
def kill_command(job_id)
|
75
77
|
command = "kill #{job_id}"
|
76
78
|
end
|
79
|
+
def delete_command(target)
|
80
|
+
command = "rm -rf #{target}"
|
81
|
+
end
|
77
82
|
end
|
78
83
|
|
79
84
|
class FGCZCluster < Cluster
|
@@ -119,5 +124,17 @@ module WorkflowManager
|
|
119
124
|
def kill_command(job_id)
|
120
125
|
command = "qdel #{job_id}"
|
121
126
|
end
|
127
|
+
def delete_command(target)
|
128
|
+
command = "g-req remove #{target}"
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
class FGCZCourseCluster < FGCZCluster
|
133
|
+
def copy_commands(org_dir, dest_parent_dir)
|
134
|
+
commands = ["cp -r #{org_dir} #{dest_parent_dir}"]
|
135
|
+
end
|
136
|
+
def delete_command(target)
|
137
|
+
command = "rm -rf #{target}"
|
138
|
+
end
|
122
139
|
end
|
123
140
|
end
|
@@ -114,6 +114,9 @@ module WorkflowManager
|
|
114
114
|
status(job_id, 'fail')
|
115
115
|
status = `#{@cluster.kill_command(job_id)}`
|
116
116
|
end
|
117
|
+
def delete_command(target)
|
118
|
+
@cluster.delete_command(target)
|
119
|
+
end
|
117
120
|
def log_puts(str)
|
118
121
|
time = Time.now.strftime("[%Y.%m.%d %H:%M:%S]")
|
119
122
|
@mutex.synchronize do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: workflow_manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-10-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -47,6 +47,7 @@ description: Workflow Manager manages job submissions using dRuby.
|
|
47
47
|
email:
|
48
48
|
- masaomi.hatakeyama@fgcz.uzh.ch
|
49
49
|
executables:
|
50
|
+
- wfm_delete_command
|
50
51
|
- wfm_get_log
|
51
52
|
- wfm_get_script
|
52
53
|
- wfm_hello
|
@@ -63,6 +64,7 @@ files:
|
|
63
64
|
- LICENSE.txt
|
64
65
|
- README.md
|
65
66
|
- Rakefile
|
67
|
+
- bin/wfm_delete_command
|
66
68
|
- bin/wfm_get_log
|
67
69
|
- bin/wfm_get_script
|
68
70
|
- bin/wfm_hello
|