Skip to content

Commit 7156fc5

Browse files
author
hluo
committed
change architecture
1 parent 5102001 commit 7156fc5

1 file changed

Lines changed: 15 additions & 12 deletions

File tree

python_rsync/rsync.py

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,33 @@
11
import sys
22
import commands, os
33

4-
def submitJob(cmd):
5-
print "submitting job using : %s" % cmd
4+
def runJob(cmd):
5+
print "running job using : %s" % cmd
66
status, jobOutput = commands.getstatusoutput(cmd)
77
print ""
88
print "===================="
99
if status == 0 :
10-
print "job return value : 0"
11-
print "job output :"
10+
print "Job return value : 0"
11+
print "Job output :"
1212
print jobOutput
1313
else :
14-
print "job failed"
15-
print "job output :"
14+
print "Job failed"
15+
print "Job output :"
1616
print jobOutput
1717

1818
return status, jobOutput
1919

20-
def tryJob(job_number):
20+
def tryJob(sourceDir, targetDir):
2121

22-
sourceDir="/store/lmfa/fct/hluo/zaurak/caseByGeometry/T/new-mesh/pointwise/postProcessing/1b_mirrorMerge/postProcessing"
23-
cmd = "rsync -av newton:%s 1b_mirrorMerge/" % sourceDir
24-
status, jobOutput = submitJob(cmd)
22+
#sourceDir="/store/lmfa/fct/hluo/zaurak/caseByGeometry/T/new-mesh/pointwise/postProcessing/1b_mirrorMerge/postProcessing"
23+
#targetDir="1b_mirrorMerge"
24+
cmd = "rsync -av newton:%s %s/" % (sourceDir, targetDir)
25+
status, jobOutput = runJob(cmd)
2526

2627
def main():
27-
#queue = sys.argv[1]
28-
tryJob(1)
28+
29+
sourceDir="/store/lmfa/fct/hluo/zaurak/caseByGeometry/T/new-mesh/pointwise/postProcessing/1b_mirrorMerge/postProcessing"
30+
targetDir="1b_mirrorMerge"
31+
tryJob(sourceDir, targetDir)
2932

3033
main()

0 commit comments

Comments
 (0)