Why isn't Graham's Law working here?

In graham's law of diffusion most numericals I have seen assumes the formula


$$\frac{r\_1}{r\_2}=\frac{P\_1}{P\_2}\sqrt{ \frac {M\_2}{M\_1}}$$


Where they say $P\_1,P\_2$ are the partial pressures of the two gases receptively inside the container.But my question is should'nt it be the difference in partial pressures inside and outside the orifice?


Because say if the pressure outside equals pressure inside then the rate of diffusion becomes $0$ .Then graham's law fails in such a case.


Please tell me if I am going wrong.


