How long

I been losing pieces of my mucus plug over the weeks but recently more of it with blood for about two days how long does it last before actual labor?