antikythera v0.2.0 AntikytheraCore.TenantExecutorPoolsManager View Source

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.

Link to this section Summary

Link to this section Functions

Link to this function all() View Source
all() :: settings()
Link to this function polling_interval() View Source
polling_interval() :: pos_integer()