View Source AntikytheraCore.TenantExecutorPoolsManager (antikythera v0.5.1)

A GenServer that caches tenant settings and apply changes to tenant executor pools.

Original information of tenant settings is (typically) stored in a slow file storage. As reading many files may take long, such kind of file operations are done by one-off processes.

Note that init/1 callback fetches all tenant settings and applies them in a blocking manner.

Note also that there are two sources of tenant setting information that this GenServer receives:

  1. periodic scanning of files
  2. notification by GenServer.call(server, {:apply, tenant_id, tenant_setting}) (may be called using multi_call)

Information given by the two sources may have conflicts, i.e. results from (1) may not include the latest info given by (2). In order not to kill working tenant executor pools, we don't immediately remove/disassociate executor pool that is not included in (1); those operations are delayed to the next :check.

Summary

Functions

Returns a specification to start this module under a supervisor.

Functions

@spec all() :: settings()

Returns a specification to start this module under a supervisor.

See Supervisor.

@spec polling_interval() :: pos_integer()