I'm new to celery. All of the examples I've seen start a celery worker from the command line. e.g:

```
$ celery -A proj worker -l info

```

I'm starting a project on elastic beanstalk and thought it would be nice to have the worker be a subprocess of my web app. I tried using multiprocessing and it seems to work. I'm wondering if this is a good idea, or if there might be some disadvantages.

```
import celery
import multiprocessing

class WorkerProcess(multiprocessing.Process):
    def __init__(self):
        super().__init__(name='celery_worker_process')

    def run(self):
        argv = [
            'worker',
            '--loglevel=WARNING',
            '--hostname=local',
        ]
        app.worker_main(argv)

def start_celery():
    global worker_process
    worker_process = WorkerProcess()
    worker_process.start()

def stop_celery():
    global worker_process
    if worker_process:
        worker_process.terminate()
        worker_process = None

worker_name = 'celery@local'
worker_process = None

app = celery.Celery()
app.config_from_object('celery_app.celeryconfig')

```