On 05/01/2018 10:13 PM, Thomas De Schampheleire wrote:

--- a/kallithea/lib/paster_commands/setup_db.py
+++ b/kallithea/lib/paster_commands/setup_db.py
@@ -19,6 +19,7 @@ Databaset setup gearbox command for Kall
  """
+import gearbox
  import os
  import sys
  import paste.deploy
@@ -103,4 +104,7 @@ class Command(BasePasterCommand):
          dbmanage.populate_default_permissions()
          Session().commit()
+ # initial repository scan
+        gearbox.main.GearBox().run(['repo-scan', '-c', self.args.config_file])

Could we do something like

+        self.config.local_conf['initial_repo_scan'] = True
+ kallithea.config.middleware.make_app_without_logging(self.config.global_conf, **self.config.local_conf)

instead? Or perhaps even better: call repo2db_mapper explicitly, as repo_scan does, instead of using initial_repo_scan.

(I consider the "scan on each startup" so much of a mis-feature that I would be happy to drop it completely.)

/Mads
_______________________________________________
kallithea-general mailing list
[email protected]
https://lists.sfconservancy.org/mailman/listinfo/kallithea-general

Reply via email to