Add a locking mechanism so jobs won't get enqueued more often than they should.