aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMart Raudsepp <leio@gentoo.org>2016-09-07 23:20:20 +0300
committerMart Raudsepp <leio@gentoo.org>2016-09-07 23:20:20 +0300
commit1e826829e42b0524365770dd329af5217a5f6b54 (patch)
tree16f9763698d1e36fd7bbf1fe3978aec3b4a2609e /manage.py
parentDon't double-quote debug output for full atoms from %r usage (diff)
downloadgrumpy-1e826829e42b0524365770dd329af5217a5f6b54.tar.gz
grumpy-1e826829e42b0524365770dd329af5217a5f6b54.tar.bz2
grumpy-1e826829e42b0524365770dd329af5217a5f6b54.zip
Add syncing of packages in categories from packages.g.o (just name)
Also add manage.py commands to call the sync steps individually for testing
Diffstat (limited to 'manage.py')
-rwxr-xr-xmanage.py25
1 files changed, 22 insertions, 3 deletions
diff --git a/manage.py b/manage.py
index 4f123aa..4634518 100755
--- a/manage.py
+++ b/manage.py
@@ -4,7 +4,7 @@
from flask_script import Manager, Shell
from backend import app, db
-from backend.lib.sync import sync_categories
+from backend.lib import sync
manager = Manager(app)
@@ -21,8 +21,27 @@ def init():
@manager.command
def sync_gentoo():
- """Syncronize Gentoo data from packages.gentoo.org API"""
- sync_categories()
+ """Synchronize Gentoo data from packages.gentoo.org API"""
+ sync.sync_categories()
+ sync.sync_packages()
+ #sync_versions()
+
+@manager.command
+def sync_categories():
+ """Synchronize only Gentoo categories data"""
+ sync.sync_categories()
+
+@manager.command
+def sync_packages():
+ """Synchronize only Gentoo packages base data (without details)"""
+ sync.sync_packages()
+
+'''
+@manager.command
+def sync_versions():
+ """Synchronize only Gentoo package details"""
+ sync.sync_versions()
+'''
if __name__ == '__main__':
manager.run()