diff --git a/UPDATING.md b/UPDATING.md index 953d2c34c400c..64e22761335be 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -29,6 +29,7 @@ assists people when migrating to a new version. ### Breaking Changes +- [19273](https://github.com/apache/superset/pull/19273): The `SUPERSET_CELERY_WORKERS` and `SUPERSET_WORKERS` config keys has been removed. Configure celery directly using `CELERY_CONFIG` on Superset - [19231](https://github.com/apache/superset/pull/19231): The `ENABLE_REACT_CRUD_VIEWS` feature flag has been removed (permanently enabled). Any deployments which had set this flag to false will need to verify that the React views support their use case. - [17556](https://github.com/apache/superset/pull/17556): Bumps mysqlclient from v1 to v2 - [19113](https://github.com/apache/superset/pull/19113): The `ENABLE_JAVASCRIPT_CONTROLS` setting has moved from app config to a feature flag. Any deployments who overrode this setting will now need to override the feature flag from here onward. diff --git a/superset/cli/celery.py b/superset/cli/celery.py deleted file mode 100755 index a0373573e8825..0000000000000 --- a/superset/cli/celery.py +++ /dev/null @@ -1,80 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -import logging -from subprocess import Popen - -import click -from colorama import Fore -from flask.cli import with_appcontext - -from superset import app -from superset.extensions import celery_app - -logger = logging.getLogger(__name__) - - -@click.command() -@with_appcontext -@click.option( - "--workers", "-w", type=int, help="Number of celery server workers to fire up", -) -def worker(workers: int) -> None: - """Starts a Superset worker for async SQL query execution.""" - logger.info( - "The 'superset worker' command is deprecated. Please use the 'celery " - "worker' command instead." - ) - if workers: - celery_app.conf.update(CELERYD_CONCURRENCY=workers) - elif app.config["SUPERSET_CELERY_WORKERS"]: - celery_app.conf.update( - CELERYD_CONCURRENCY=app.config["SUPERSET_CELERY_WORKERS"] - ) - - local_worker = celery_app.Worker(optimization="fair") - local_worker.start() - - -@click.command() -@with_appcontext -@click.option( - "-p", "--port", default="5555", help="Port on which to start the Flower process", -) -@click.option( - "-a", "--address", default="localhost", help="Address on which to run the service", -) -def flower(port: int, address: str) -> None: - """Runs a Celery Flower web server - - Celery Flower is a UI to monitor the Celery operation on a given - broker""" - broker_url = celery_app.conf.BROKER_URL - cmd = ( - "celery flower " - f"--broker={broker_url} " - f"--port={port} " - f"--address={address} " - ) - logger.info( - "The 'superset flower' command is deprecated. Please use the 'celery " - "flower' command instead." - ) - print(Fore.GREEN + "Starting a Celery Flower instance") - print(Fore.BLUE + "-=" * 40) - print(Fore.YELLOW + cmd) - print(Fore.BLUE + "-=" * 40) - Popen(cmd, shell=True).wait() # pylint: disable=consider-using-with diff --git a/superset/config.py b/superset/config.py index 86e35be718702..c8c0a0053141b 100644 --- a/superset/config.py +++ b/superset/config.py @@ -140,8 +140,6 @@ def _try_json_readsha(filepath: str, length: int) -> Optional[str]: SAMPLES_ROW_LIMIT = 1000 # max rows retrieved by filter select auto complete FILTER_SELECT_ROW_LIMIT = 10000 -SUPERSET_WORKERS = 2 # deprecated -SUPERSET_CELERY_WORKERS = 32 # deprecated SUPERSET_WEBSERVER_PROTOCOL = "http" SUPERSET_WEBSERVER_ADDRESS = "0.0.0.0"