This is an automated email from the ASF dual-hosted git repository.

dpgaspar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 783168e  chore: remove deprecated celery cli (#19273)
783168e is described below

commit 783168e13fd06794507807f782956b7a41e2ab8f
Author: Daniel Vaz Gaspar <[email protected]>
AuthorDate: Mon Mar 21 13:09:38 2022 +0000

    chore: remove deprecated celery cli (#19273)
    
    * chore: remove deprecated celery cli
    
    * remove configs and UPDATING
---
 UPDATING.md            |  1 +
 superset/cli/celery.py | 80 --------------------------------------------------
 superset/config.py     |  2 --
 3 files changed, 1 insertion(+), 82 deletions(-)

diff --git a/UPDATING.md b/UPDATING.md
index 953d2c3..64e2276 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 a037357..0000000
--- 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__)
-
-
[email protected]()
-@with_appcontext
[email protected](
-    "--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()
-
-
[email protected]()
-@with_appcontext
[email protected](
-    "-p", "--port", default="5555", help="Port on which to start the Flower 
process",
-)
[email protected](
-    "-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 86e35be..c8c0a00 100644
--- a/superset/config.py
+++ b/superset/config.py
@@ -140,8 +140,6 @@ ROW_LIMIT = 50000
 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"

Reply via email to