aboutsummaryrefslogtreecommitdiffstats
path: root/finalstore.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mekanisti.fi>2009-12-29 11:48:29 +0200
committerFilipp Lepalaan <filipp@mekanisti.fi>2009-12-29 11:48:29 +0200
commit876f379aab094ffb029c6c8f17ff2d73d92a8f1e (patch)
tree7499b76879ba12d1825f073f07192deed07c075f /finalstore.py
parentc7fb2ef2232f6d75b94391dd22bf68683e80da91 (diff)
downloadFinalStore-876f379aab094ffb029c6c8f17ff2d73d92a8f1e.tar.gz
FinalStore-876f379aab094ffb029c6c8f17ff2d73d92a8f1e.tar.bz2
FinalStore-876f379aab094ffb029c6c8f17ff2d73d92a8f1e.zip
Only archive stuff once, better config, bugfixes, etcHEADmaster
Diffstat (limited to 'finalstore.py')
-rwxr-xr-xfinalstore.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/finalstore.py b/finalstore.py
index f7d9cd9..218cc37 100755
--- a/finalstore.py
+++ b/finalstore.py
@@ -18,7 +18,6 @@ def growl(str):
Popen(cmd, shell=False).communicate()
except Exception, e:
print "Failed to initialize Growl"
-
"""
Forward the files to awcli
@@ -41,11 +40,18 @@ def doit(task, f, ap):
r = Popen([awcli, task, ap] + assets, stdout=PIPE, shell=False).communicate()
jid = r[0].strip()
+ if jid == "-1":
+ growl("Asset already archived")
+ sys.exit(0)
+
print task + " job ID is " + jid
- growl("Started %s job %s (%d assets)" % (task, jid, len(assets)))
+ ac = len(assets)
+ sfx = "s"
+ if ac == 1 : sfx = ""
+ growl("Started %s job %s (%d asset%s)" % (task, jid, ac, sfx))
# Wait for the job to finish
- sock = "awsock:/%s:%s@%s:9001" % (USER, PASSWORD, HOST)
+ sock = "awsock:/%s:%s@%s:%s" % (AWUSER, AWPASSWORD, AWHOST, AWPORT)
cmd = "Job %s status" % (jid)
while True: