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.
If this happens, will the compose be marked as failed? I wonder if we should just log a warning and return.