clean up logic in update-state
clean up logic in update-state

dask/distributed,broxtronix/distributed,amosonn/distributed,dask/distributed,mrocklin/distributed,amosonn/distributed,amosonn/distributed,blaze/distributed,blaze/distributed,mrocklin/distributed,broxtronix/distributed,dask/distributed,broxtronix/distributed,dask/distributed,mrocklin/distributed