- run_legacy_script('setup.php', '--setup-website',
- nominatim_env=args, throw_on_fail=True)
+ webdir = args.project_dir / 'website'
+ LOG.warning('Setting up website directory at %s', webdir)
+ # This is a little bit hacky: call the tokenizer setup, so that
+ # the tokenizer directory gets repopulated as well, in case it
+ # wasn't there yet.
+ self._get_tokenizer(args.config)
+ with connect(args.config.get_libpq_dsn()) as conn:
+ refresh.setup_website(webdir, args.config, conn)
+
+ if args.data_object or args.data_area:
+ with connect(args.config.get_libpq_dsn()) as conn:
+ for obj in args.data_object or []:
+ refresh.invalidate_osm_object(*obj, conn, recursive=False)
+ for obj in args.data_area or []:
+ refresh.invalidate_osm_object(*obj, conn, recursive=True)
+ conn.commit()