Azure Environment detection - Stop processing jobs in staging environment

When hosting Hangfire in Azure as web role, is there any way to stop processing jobs if Azure web role is in staging environment ?

The problem is, that staging / production environments can have different incompatible versions of application (this is really a common case when upgrading DB schema of application).

PS: You can programatically make VERSION2 to be backward compatible with VERSION1, but this cannot be done in reverse, so jobs run with Hangfire in VERSION1 can cause errors, hangups or even damage a data.