Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sdx controller a WSGI app #215

Merged
merged 18 commits into from
Jan 30, 2024
Merged

Make sdx controller a WSGI app #215

merged 18 commits into from
Jan 30, 2024

Commits on Jan 27, 2024

  1. Rename __main__.py to app.py

    sajith committed Jan 27, 2024
    Configuration menu
    Copy the full SHA
    c62d09a View commit details
    Browse the repository at this point in the history
  2. Here be a flask app

    sajith committed Jan 27, 2024
    Configuration menu
    Copy the full SHA
    b043e68 View commit details
    Browse the repository at this point in the history
  3. Run RpcConsumer in a thread

    sajith committed Jan 27, 2024
    Configuration menu
    Copy the full SHA
    b651f54 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    eac8843 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bcda588 View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2024

  1. Configuration menu
    Copy the full SHA
    18eeb3b View commit details
    Browse the repository at this point in the history
  2. Call stop_consuming() on exit

    sajith committed Jan 29, 2024
    Configuration menu
    Copy the full SHA
    2e04340 View commit details
    Browse the repository at this point in the history
  3. Use daemon threads

    With daemon = True, when stopping the process:
    
        ^CINFO:root:Stopping RPC queue consumer
        INFO:sdx_controller.messaging.rpc_queue_consumer:[MQ] Stopping threads.
    
    When daemon is not set:
    
        ^C^CException ignored in: <module 'threading' from '/usr/lib/python3.11/threading.py'>
        Traceback (most recent call last):
          File "/usr/lib/python3.11/threading.py", line 1583, in _shutdown
            lock.acquire()
        KeyboardInterrupt:
        INFO:root:Stopping RPC queue consumer
        INFO:sdx_controller.messaging.rpc_queue_consumer:[MQ] Stopping threads.
    sajith committed Jan 29, 2024
    Configuration menu
    Copy the full SHA
    9f9a54b View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2024

  1. Move create_app() to module top-level

    This is a work-around with testing in mind. We do not really use the
    message queue, at least right now, in our little unit/integration test
    suite. We do use the database.  With this restructuring, we do not
    have to bring up the message queue for testing, just the DB.
    
    When we are ready to test things with the message queue, we might want
    to turn this back though.
    sajith committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    db60602 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a56899f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d9f710e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    df11d8e View commit details
    Browse the repository at this point in the history
  5. Fix errors

    sajith committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    d5d611a View commit details
    Browse the repository at this point in the history
  6. Get rid of old threading logic

    WSGI server should manage the threads now
    sajith committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    9ed2d7d View commit details
    Browse the repository at this point in the history
  7. Add a docstring

    sajith committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    482123b View commit details
    Browse the repository at this point in the history
  8. Remove extra logging

    sajith committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    d455f2e View commit details
    Browse the repository at this point in the history
  9. Add docstrings

    sajith committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    6b4a80f View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    ef8c70c View commit details
    Browse the repository at this point in the history