ping based workers

This commit is contained in:
2024-01-02 16:48:22 +02:00
parent ee806f6d44
commit ac1ed209d4
47 changed files with 306 additions and 953 deletions

View File

@ -108,14 +108,6 @@ ahriman.core.database.migrations.m012\_last\_commit\_sha module
:no-undoc-members:
:show-inheritance:
ahriman.core.database.migrations.m013\_workers module
-----------------------------------------------------
.. automodule:: ahriman.core.database.migrations.m013_workers
:members:
:no-undoc-members:
:show-inheritance:
Module contents
---------------

View File

@ -60,14 +60,6 @@ ahriman.core.database.operations.patch\_operations module
:no-undoc-members:
:show-inheritance:
ahriman.core.database.operations.workers\_operations module
-----------------------------------------------------------
.. automodule:: ahriman.core.database.operations.workers_operations
:members:
:no-undoc-members:
:show-inheritance:
Module contents
---------------

View File

@ -20,14 +20,6 @@ ahriman.core.distributed.worker\_loader\_trigger module
:no-undoc-members:
:show-inheritance:
ahriman.core.distributed.worker\_register\_trigger module
---------------------------------------------------------
.. automodule:: ahriman.core.distributed.worker_register_trigger
:members:
:no-undoc-members:
:show-inheritance:
ahriman.core.distributed.worker\_trigger module
-----------------------------------------------
@ -36,10 +28,10 @@ ahriman.core.distributed.worker\_trigger module
:no-undoc-members:
:show-inheritance:
ahriman.core.distributed.worker\_unregister\_trigger module
-----------------------------------------------------------
ahriman.core.distributed.workers\_cache module
----------------------------------------------
.. automodule:: ahriman.core.distributed.worker_unregister_trigger
.. automodule:: ahriman.core.distributed.workers_cache
:members:
:no-undoc-members:
:show-inheritance:

View File

@ -260,14 +260,6 @@ ahriman.web.schemas.versioned\_log\_schema module
:no-undoc-members:
:show-inheritance:
ahriman.web.schemas.worker\_id\_schema module
---------------------------------------------
.. automodule:: ahriman.web.schemas.worker_id_schema
:members:
:no-undoc-members:
:show-inheritance:
ahriman.web.schemas.worker\_schema module
-----------------------------------------

View File

@ -4,14 +4,6 @@ ahriman.web.views.v1.distributed package
Submodules
----------
ahriman.web.views.v1.distributed.worker module
----------------------------------------------
.. automodule:: ahriman.web.views.v1.distributed.worker
:members:
:no-undoc-members:
:show-inheritance:
ahriman.web.views.v1.distributed.workers module
-----------------------------------------------

View File

@ -37,6 +37,7 @@ This package contains everything required for the most of application actions an
* ``ahriman.core.build_tools`` is a package which provides wrapper for ``devtools`` commands.
* ``ahriman.core.configuration`` contains extension for standard ``configparser`` library and some validation related classes.
* ``ahriman.core.database`` is everything for database, including data and schema migrations.
* ``ahriman.core.distributed`` package with triggers and helpers for distributed build system.
* ``ahriman.core.formatters`` package provides ``Printer`` sub-classes for printing data (e.g. package properties) to stdout which are used by some handlers.
* ``ahriman.core.gitremote`` is a package with remote PKGBUILD triggers. Should not be called directly.
* ``ahriman.core.http`` package provides HTTP clients which can be used later by other classes.

View File

@ -359,5 +359,5 @@ Requires ``boto3`` library to be installed. Section name must be either ``s3`` (
This section controls settings for ``ahriman.core.distributed.WorkerTrigger`` plugin.
* ``address`` - address of the instance, string, required. Must be reachable for the master instance.
* ``identifier`` - unique identifier of the instance, string, optional. If none set, the random uuid will be generated on each run automatically.
* ``identifier_path`` - path to lock file, string, optional, default is ``/tmp/ahriman-worker-identifier``.
* ``identifier`` - unique identifier of the instance, string, optional.
* ``time_to_live`` - amount of time which remote worker will be considered alive in seconds, integer, optional, default is ``60``. The ping interval will be set automatically equal this value divided by 4.

View File

@ -22,9 +22,7 @@ Special trigger to be used to load workers from database on the start of the app
``ahriman.core.distributed.WorkerTrigger``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Another trigger for the distributed system, which registers itself as remote worker. It calls the remote server on start (if no lock file found) and, later, it deregister itself before the stop.
There are also two triggers which performs only registration and removal (``ahriman.core.distributed.WorkerRegisterTrigger`` and ``ahriman.core.distributed.WorkerUnregisterTrigger`` respectively), but they are not meant to be called directly.
Another trigger for the distributed system, which registers itself as remote worker, calling remote service periodically.
``ahriman.core.gitremote.RemotePullTrigger``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^