summaryrefslogtreecommitdiff
path: root/src/backend/syncdb.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/syncdb.py')
-rw-r--r--src/backend/syncdb.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/backend/syncdb.py b/src/backend/syncdb.py
index b5d86ae..65812ac 100644
--- a/src/backend/syncdb.py
+++ b/src/backend/syncdb.py
@@ -8,6 +8,7 @@ import subprocess
import sisyphus.getenv
import sisyphus.getfs
+
def remoteCSV():
packagesCsvURL,descriptionsCsvURL = sisyphus.getenv.csvURL()
http = urllib3.PoolManager()
@@ -18,9 +19,11 @@ def remoteCSV():
with http.request('GET', descriptionsCsvURL, preload_content=False) as tmp_buffer, open(sisyphus.getfs.remoteDescriptionsCsv, 'wb') as output_file:
shutil.copyfileobj(tmp_buffer, output_file)
+
def localCSV():
subprocess.call(['/usr/share/sisyphus/helpers/make_local_csv'])
+
def remoteTable():
remoteCSV()
@@ -41,6 +44,7 @@ def remoteTable():
sisyphusdb.commit()
sisyphusdb.close()
+
def localTable():
localCSV()