workflow_manager 0.1.2 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,7 +26,7 @@ module WorkflowManager
|
|
26
26
|
end
|
27
27
|
def job_ends?(log_file)
|
28
28
|
end
|
29
|
-
def copy_commands(org_dir, dest_parent_dir)
|
29
|
+
def copy_commands(org_dir, dest_parent_dir, now=nil)
|
30
30
|
end
|
31
31
|
def kill_command(job_id)
|
32
32
|
end
|
@@ -67,7 +67,7 @@ module WorkflowManager
|
|
67
67
|
result = `#{command}`
|
68
68
|
result.to_s.empty? ? false : true
|
69
69
|
end
|
70
|
-
def copy_commands(org_dir, dest_parent_dir)
|
70
|
+
def copy_commands(org_dir, dest_parent_dir, now=nil)
|
71
71
|
commands = []
|
72
72
|
commands << "mkdir -p #{dest_parent_dir}"
|
73
73
|
commands << "cp -r #{org_dir} #{dest_parent_dir}"
|
@@ -108,7 +108,7 @@ module WorkflowManager
|
|
108
108
|
end
|
109
109
|
def job_ends?(log_file)
|
110
110
|
log_flag = false
|
111
|
-
IO.popen("tail -n 10 #{log_file}") do |io|
|
111
|
+
IO.popen("tail -n 10 #{log_file} 2> /dev/null") do |io|
|
112
112
|
while line=io.gets
|
113
113
|
if line =~ /__SCRIPT END__/
|
114
114
|
log_flag = true
|
@@ -118,8 +118,12 @@ module WorkflowManager
|
|
118
118
|
end
|
119
119
|
log_flag
|
120
120
|
end
|
121
|
-
def copy_commands(org_dir, dest_parent_dir)
|
122
|
-
commands =
|
121
|
+
def copy_commands(org_dir, dest_parent_dir, now=nil)
|
122
|
+
commands = if now
|
123
|
+
["g-req copynow #{org_dir} #{dest_parent_dir}"]
|
124
|
+
else
|
125
|
+
["g-req -w copy #{org_dir} #{dest_parent_dir}"]
|
126
|
+
end
|
123
127
|
end
|
124
128
|
def kill_command(job_id)
|
125
129
|
command = "qdel #{job_id}"
|
@@ -130,7 +134,7 @@ module WorkflowManager
|
|
130
134
|
end
|
131
135
|
|
132
136
|
class FGCZCourseCluster < FGCZCluster
|
133
|
-
def copy_commands(org_dir, dest_parent_dir)
|
137
|
+
def copy_commands(org_dir, dest_parent_dir, now=nil)
|
134
138
|
commands = ["cp -r #{org_dir} #{dest_parent_dir}"]
|
135
139
|
end
|
136
140
|
def delete_command(target)
|
@@ -107,8 +107,8 @@ module WorkflowManager
|
|
107
107
|
def hello
|
108
108
|
'hello, '+ @cluster.name
|
109
109
|
end
|
110
|
-
def copy_commands(org_dir, dest_parent_dir)
|
111
|
-
@cluster.copy_commands(org_dir, dest_parent_dir)
|
110
|
+
def copy_commands(org_dir, dest_parent_dir, now=nil)
|
111
|
+
@cluster.copy_commands(org_dir, dest_parent_dir, now)
|
112
112
|
end
|
113
113
|
def kill_job(job_id)
|
114
114
|
status(job_id, 'fail')
|
@@ -251,7 +251,7 @@ module WorkflowManager
|
|
251
251
|
end
|
252
252
|
#@statuses.close
|
253
253
|
end
|
254
|
-
s.
|
254
|
+
s.sort_by{|key, value| value.split(',')[2]}.reverse.map{|v| v.join(',')}.join("\n")
|
255
255
|
end
|
256
256
|
def get_log(job_id, with_err=false)
|
257
257
|
log_file = nil
|
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.7
|
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-12-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|