sika-code-cloud opened a new issue, #31739:
URL: https://github.com/apache/superset/issues/31739

   ### Bug description
   
   When I used the following command to start the work function for 
asynchronous queries, celery --app=superset.tasks.celery_app:app worker 
--pool=prefork -O fair -c 1, the following error message was prompted.
   `
   worker: Cold shutdown (MainProcess)
   Traceback (most recent call last):
     File "<string>", line 1, in <module>
     File 
"E:\project\sika\superset4.1\venv\lib\site-packages\billiard\spawn.py", line 
164, in spawn_main
       exitcode = _main(fd)
     File 
"E:\project\sika\superset4.1\venv\lib\site-packages\billiard\spawn.py", line 
206, in _main
       self = pickle.load(from_parent)
   ModuleNotFoundError: No module named 'superset_config'
   `
   this my superset_config.py
   `from flask_caching.backends.rediscache import RedisCache
   
   SECRET_KEY = 'w9!!5gl6i%msfb6gb2=%x7j100h=($vrj1&)1jg8rxy9%at#4('
   # The SQLAlchemy connection string.
   # SQLALCHEMY_DATABASE_URI = (
   #     f"""sqlite:///{os.path.join(DATA_DIR, 
"superset.db")}?check_same_thread=false"""
   # )
   SQLALCHEMY_DATABASE_URI = 
'mysql://root:123456@localhost:3306/superset?charset=utf8'
   
   RESULTS_BACKEND = RedisCache(
       host='localhost', port=6379, key_prefix='superset_results') 
   # Use PyArrow and MessagePack for async query results serialization,
   # rather than JSON. This feature requires additional testing from the
   # community before it is fully adopted, so this config option is provided
   # in order to disable should breaking issues be discovered.
   RESULTS_BACKEND_USE_MSGPACK = False
   
   class CeleryConfig(object):
       broker_url = "redis://localhost:6379/0"
       imports = (
           "superset.sql_lab",
           "superset.tasks.scheduler",
       )
       result_backend = "redis://localhost:6379/0"
       worker_prefetch_multiplier = 10
       task_acks_late = True
       task_annotations = {
           "sql_lab.get_sql_results": {
               "rate_limit": "100/s",
           },
       }
   
   
   CELERY_CONFIG = CeleryConfig
   `
   python: 3.11.9
   superset: 4.1.1
   
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   4.1.1
   
   ### Python version
   
   3.11
   
   ### Node version
   
   16
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [X] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [X] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [X] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to