From e738b243679e623b3fe93d51d2a524f7b0f3f5d7 Mon Sep 17 00:00:00 2001 From: DMITRIY PEDCHENKO Date: Wed, 27 Mar 2024 17:19:47 +0300 Subject: [PATCH] [DOP-13293] Add doc --- .github/workflows/release.yaml | 4 ++-- docs/backend/install.rst | 24 ++++++++++++------------ docs/changelog/0.0.1.rst | 1 - 3 files changed, 14 insertions(+), 15 deletions(-) delete mode 100644 docs/changelog/0.0.1.rst diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6b03695b..c423bbd4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -67,8 +67,8 @@ jobs: - name: Build package run: poetry build -# - name: Publish package -# uses: pypa/gh-action-pypi-publish@release/v1 + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1 - name: Get changelog run: | diff --git a/docs/backend/install.rst b/docs/backend/install.rst index 11c1210f..41d92325 100644 --- a/docs/backend/install.rst +++ b/docs/backend/install.rst @@ -68,21 +68,24 @@ but the only one we really tested is Postgres. See :ref:`Database settings ` for more options. -Run migrations -~~~~~~~~~~~~~~ +Run worker +~~~~~~~~~~ -To apply migrations (database structure changes) you need to execute following command: +.. note:: -.. code-block:: console + Before starting the worker you need to create a queue. + The queue is created by sending a post request to ``/queues`` endpoint (See Swagger doc for details). + +для запуска воркера нужно выполнить команду - $ python -m syncmaster.backend.db.migrations upgrade head +.. code-block:: console -This is a thin wrapper around `alembic `_ cli, -options and commands are just the same. + $ celery -A syncmaster.worker.config.celery worker --loglevel=info --max-tasks-per-child=1 -Q queue_name .. note:: - This command should be executed after each upgrade to new syncmaster version. + The specified celery options are given as an example, you can specify other options you need. + Run backend ~~~~~~~~~~~ @@ -91,9 +94,6 @@ To start backend server you need to execute following command: .. code-block:: console - $ python -m syncmaster.backend.main --host 0.0.0.0 --port 8000 - -This is a thin wrapper around `uvicorn `_ cli, -options and commands are just the same. + $ python -m syncmaster.backend.main After server is started and ready, open http://localhost:8000/docs. diff --git a/docs/changelog/0.0.1.rst b/docs/changelog/0.0.1.rst deleted file mode 100644 index 5f0c613b..00000000 --- a/docs/changelog/0.0.1.rst +++ /dev/null @@ -1 +0,0 @@ -some changes \ No newline at end of file