Sentry Issue: [POSTHOG-3ES](https://sentry.io/organizations/posthog/issues/2590699112/?referrer=github_integration)

```
TypeError: '>=' not supported between instances of 'str' and 'int'
  File "posthog/celery.py", line 271, in calculate_cohort
    calculate_cohorts()
  File "posthog/tasks/calculate_cohort.py", line 25, in calculate_cohorts
    Cohort.objects.filter(
  File "django/db/models/query.py", line 296, in __getitem__
    (k.stop is None or k.stop >= 0))), \
```
posthog/settings.py
value = os.getenv(key)
    if value is None:
        if optional:
            return None
        if default is not None:
            return default
        else:
            raise ImproperlyConfigured(f'The environment variable "{key}" is required to run PostHog!')
    if type_cast is not None:
        return type_cast(value)
    return value
def get_list(text: str) -> List[str]:
    if not text:
        return []
    return [item.strip() for item in text.split(",")]
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DEBUG = get_from_env("DEBUG", False, type_cast=str_to_bool)
TEST = (
    "test" in sys.argv or sys.argv[0].endswith("pytest") or get_from_env("TEST", False, type_cast=str_to_bool)
)  
E2E_TESTING = get_from_env(
    "E2E_TESTING", False, type_cast=str_to_bool,
)  
if E2E_TESTING:
    print_warning(
        ("️WARNING! E2E_TESTING is set to `True`. This is a security vulnerability unless you are running tests.")
    )
# These flags will be force-enabled on the frontend **in addition to** flags from `/decide`
# The features here are released, but the flags are just not yet removed from the code.