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
from ee.apps import EnterpriseConfig  # no
    except ImportError:
        pass
    else:
        CELERY_IMPORTS.append("ee.tasks.webhooks_ee")
CELERY_BROKER_URL = REDIS_URL  # celery connects to redis
CELERY_BEAT_MAX_LOOP_INTERVAL = 30  # sleep max 30sec before checking for new periodic events
CELERY_RESULT_BACKEND = REDIS_URL  # stores results for lookup when processing
CELERY_IGNORE_RESULT = True  # only applies to delay(), must do @shared_task(ignore_result=True) for apply_async
CELERY_RESULT_EXPIRES = timedelta(days=4)  # expire tasks after 4 days instead of the default 1
REDBEAT_LOCK_TIMEOUT = 45  # keep distributed beat lock for 45sec
CACHED_RESULTS_TTL = 7 * 24 * 60 * 60  # how long to keep cached results for
TEMP_CACHE_RESULTS_TTL = 24 * 60 * 60  # how long to keep non dashboard cached results for
# Password validation
# https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
    {"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",},
]
# shell_plus settings
# https://django-extensions.readthedocs.io/en/latest/shell_plus.html
SHELL_PLUS_PRINT_SQL = get_from_env("PRINT_SQL", False, type_cast=str_to_bool)
SHELL_PLUS_POST_IMPORTS = [
    ("posthog.models.filters", ("Filter",)),
]
if PRIMARY_DB == RDBMS.CLICKHOUSE:
    SHELL_PLUS_POST_IMPORTS.append(("ee.clickhouse.client", ("sync_execute",)))
# Internationalization
# https://docs.djangoproject.com/en/2.2/topics/i18n/
LANGUAGE_CODE = "en-us"
TIME_ZONE = "UTC"