Commit afdbf499 authored by Alyssa Ross's avatar Alyssa Ross
Browse files

nixos/mailman: hyperkitty needs mailman-web-setup

qcluster won't be happy if it's started before the database migrations
have been run.

	12:25:47 [Q] ERROR Failed to pull task from broker
	Traceback (most recent call last):
	  File "/nix/store/w5ndmidmkiy02vvgl7cxx1fkzc1pichg-python3-3.12.9-env/lib/python3.12/site-packages/django/db/backends/utils.py", line 89, in _execute
	    return self.cursor.execute(sql, params)
	           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	  File "/nix/store/w5ndmidmkiy02vvgl7cxx1fkzc1pichg-python3-3.12.9-env/lib/python3.12/site-packages/django/db/backends/sqlite3/base.py", line 328, in execute
	    return super().execute(query, params)
	           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	sqlite3.OperationalError: no such table: django_q_ormq
parent 0a072c9d
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -661,8 +661,14 @@ in

        mailman-web-setup = {
          description = "Prepare mailman-web files and database";
          before = [ "mailman-uwsgi.service" ];
          requiredBy = [ "mailman-uwsgi.service" ];
          before = [
            "hyperkitty.service"
            "mailman-uwsgi.service"
          ];
          requiredBy = [
            "hyperkitty.service"
            "mailman-uwsgi.service"
          ];
          restartTriggers = [ config.environment.etc."mailman3/settings.py".source ];
          script = ''
            [[ -e "${webSettings.STATIC_ROOT}" ]] && find "${webSettings.STATIC_ROOT}/" -mindepth 1 -delete