summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-03-25 17:41:40 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-03-25 17:41:40 +0000
commit165d40d172f82b4e8a74cdc2f6179b5c677c1948 (patch)
treed10ffaf2e59584941439e75c73dc208429cfd050
parent26d3128ab6dfbf5b5743f339d4dff54b1e503995 (diff)
downloadlorry-controller-165d40d172f82b4e8a74cdc2f6179b5c677c1948.tar.gz
Actually insert from_path in new Trove records
-rw-r--r--lorrycontroller/givemejob.py3
-rw-r--r--lorrycontroller/statedb.py6
2 files changed, 6 insertions, 3 deletions
diff --git a/lorrycontroller/givemejob.py b/lorrycontroller/givemejob.py
index bfad6c5..55f9821 100644
--- a/lorrycontroller/givemejob.py
+++ b/lorrycontroller/givemejob.py
@@ -80,6 +80,9 @@ class GiveMeJob(lorrycontroller.LorryControllerRoute):
def copy_repository_metadata(self, lorry_info):
'''Copy project.head and project.description to the local Trove.'''
+ assert lorry_info['from_trovehost']
+ assert lorry_info['from_path']
+
try:
remote_config = self.get_gitano_config(
lorry_info['from_trovehost'], lorry_info['from_path'])
diff --git a/lorrycontroller/statedb.py b/lorrycontroller/statedb.py
index b49da60..1f45593 100644
--- a/lorrycontroller/statedb.py
+++ b/lorrycontroller/statedb.py
@@ -314,10 +314,10 @@ class StateDB(object):
c = self.get_cursor()
c.execute(
'INSERT INTO lorries '
- '(path, text, from_trovehost, last_run, interval, '
+ '(path, text, from_trovehost, from_path, last_run, interval, '
'running_job, kill_job) '
- 'VALUES (?, ?, ?, ?, ?, ?, ?)',
- (path, text, from_trovehost, 0, interval, None, 0))
+ 'VALUES (?, ?, ?, ?, ?, ?, ?, ?)',
+ (path, text, from_trovehost, from_path, 0, interval, None, 0))
else:
c = self.get_cursor()
c.execute(