d2d5f1c Do not execute generation of compose which is not in 'wait' state.

Authored and Committed by jkaluza 4 years ago
    Do not execute generation of compose which is not in 'wait' state.
    
    Lack of this check was causing issues during the PSI outages when RabbitMQ
    went up and down.
    
    When the RabbitMQ goes down and up while the backend is still processing
    the message, the RabbitMQ will resend the message again. This means
    we will receive the message twice in the backend.
    
    This PR fixes it by checking that compose the message is about is
    in 'wait' state before we start processing it.