implemented lock mechanism in order to inform web api when engin is running