flagsmith-common 2.2.5__tar.gz → 2.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/PKG-INFO +1 -1
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/pyproject.toml +1 -1
- flagsmith_common-2.2.7/src/common/core/constants.py +1 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/core/main.py +5 -14
- flagsmith_common-2.2.5/src/common/core/constants.py +0 -1
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/LICENSE +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/README.md +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/__init__.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/core/__init__.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/core/app.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/core/cli/__init__.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/core/cli/healthcheck.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/core/logging.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/core/management/__init__.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/core/management/commands/__init__.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/core/management/commands/docgen.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/core/management/commands/start.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/core/management/commands/waitfordb.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/core/metrics.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/core/middleware.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/core/templates/docgen-metrics.md +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/core/urls.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/core/utils.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/core/views.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/environments/permissions.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/features/__init__.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/features/multivariate/__init__.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/features/multivariate/serializers.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/features/serializers.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/features/versioning/__init__.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/features/versioning/serializers.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/gunicorn/__init__.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/gunicorn/conf.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/gunicorn/constants.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/gunicorn/logging.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/gunicorn/metrics.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/gunicorn/middleware.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/gunicorn/utils.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/migrations/__init__.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/migrations/helpers/__init__.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/migrations/helpers/postgres_helpers.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/organisations/permissions.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/projects/permissions.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/prometheus/__init__.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/prometheus/utils.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/py.typed +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/test_tools/__init__.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/test_tools/plugin.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/test_tools/types.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/test_tools/utils.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/types.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/__init__.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/admin.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/apps.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/decorators.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/exceptions.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/health.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/managers.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/metrics.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/migrations/0001_initial.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/migrations/0002_healthcheckmodel.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/migrations/0003_add_completed_to_task.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/migrations/0004_recreate_task_indexes.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/migrations/0005_update_conditional_index_conditions.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/migrations/0006_auto_20230221_0802.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/migrations/0007_add_is_locked.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/migrations/0008_add_get_task_to_process_function.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/migrations/0009_add_recurring_task_run_first_run_at.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/migrations/0010_task_priority.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/migrations/0011_add_priority_to_get_tasks_to_process.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/migrations/0012_add_locked_at_and_timeout.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/migrations/0013_add_last_picked_at.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/migrations/__init__.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/migrations/sql/0008_get_recurring_tasks_to_process.sql +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/migrations/sql/0008_get_tasks_to_process.sql +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/migrations/sql/0011_get_tasks_to_process.sql +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/migrations/sql/0012_get_recurringtasks_to_process.sql +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/migrations/sql/0013_get_recurringtasks_to_process.sql +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/migrations/sql/__init__.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/models.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/monitoring.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/processor.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/py.typed +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/routers.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/serializers.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/task_registry.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/task_run_method.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/tasks.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/threads.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/types.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/urls.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/utils.py +0 -0
- {flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/views.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
DEFAULT_PROMETHEUS_MULTIPROC_DIR_NAME = "flagsmith-prometheus"
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import contextlib
|
|
2
2
|
import logging
|
|
3
3
|
import os
|
|
4
|
-
import shutil
|
|
5
4
|
import sys
|
|
6
5
|
import typing
|
|
6
|
+
from tempfile import mkdtemp
|
|
7
7
|
|
|
8
8
|
from django.core.management import (
|
|
9
9
|
execute_from_command_line as django_execute_from_command_line,
|
|
10
10
|
)
|
|
11
11
|
|
|
12
12
|
from common.core.cli import healthcheck
|
|
13
|
-
from common.core.constants import DEFAULT_PROMETHEUS_MULTIPROC_DIR
|
|
14
13
|
|
|
15
14
|
logger = logging.getLogger(__name__)
|
|
16
15
|
|
|
@@ -35,6 +34,10 @@ def ensure_cli_env() -> typing.Generator[None, None, None]:
|
|
|
35
34
|
|
|
36
35
|
# TODO @khvn26 Move logging setup to here
|
|
37
36
|
|
|
37
|
+
# Prometheus multiproc support
|
|
38
|
+
if not os.environ.get("PROMETHEUS_MULTIPROC_DIR"):
|
|
39
|
+
os.environ["PROMETHEUS_MULTIPROC_DIR"] = mkdtemp(prefix="flagsmith-prometheus-")
|
|
40
|
+
|
|
38
41
|
# Currently we don't install Flagsmith modules as a package, so we need to add
|
|
39
42
|
# $CWD to the Python path to be able to import them
|
|
40
43
|
sys.path.append(os.getcwd())
|
|
@@ -43,18 +46,6 @@ def ensure_cli_env() -> typing.Generator[None, None, None]:
|
|
|
43
46
|
# without resorting to it being set outside of the application
|
|
44
47
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings.dev")
|
|
45
48
|
|
|
46
|
-
# Set up Prometheus' multiprocess mode
|
|
47
|
-
prometheus_multiproc_dir_name = os.environ.setdefault(
|
|
48
|
-
"PROMETHEUS_MULTIPROC_DIR",
|
|
49
|
-
DEFAULT_PROMETHEUS_MULTIPROC_DIR,
|
|
50
|
-
)
|
|
51
|
-
shutil.rmtree(prometheus_multiproc_dir_name, ignore_errors=True)
|
|
52
|
-
os.makedirs(prometheus_multiproc_dir_name, exist_ok=True)
|
|
53
|
-
logger.info(
|
|
54
|
-
"Re-created %s for Prometheus multi-process mode",
|
|
55
|
-
prometheus_multiproc_dir_name,
|
|
56
|
-
)
|
|
57
|
-
|
|
58
49
|
if "docgen" in sys.argv:
|
|
59
50
|
os.environ["DOCGEN_MODE"] = "true"
|
|
60
51
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
DEFAULT_PROMETHEUS_MULTIPROC_DIR = "/tmp/flagsmith-prometheus"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/core/management/commands/__init__.py
RENAMED
|
File without changes
|
{flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/core/management/commands/docgen.py
RENAMED
|
File without changes
|
{flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/core/management/commands/start.py
RENAMED
|
File without changes
|
{flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/core/management/commands/waitfordb.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/core/templates/docgen-metrics.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/features/multivariate/__init__.py
RENAMED
|
File without changes
|
{flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/features/multivariate/serializers.py
RENAMED
|
File without changes
|
|
File without changes
|
{flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/features/versioning/__init__.py
RENAMED
|
File without changes
|
{flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/features/versioning/serializers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/common/migrations/helpers/postgres_helpers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/migrations/0001_initial.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flagsmith_common-2.2.5 → flagsmith_common-2.2.7}/src/task_processor/migrations/sql/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|