# File lib/ruote/worker.rb, line 172
    def determine_state

      @state_mutex.synchronize do

        @state = (
          @storage.get('variables', 'worker') || { 'state' => 'running' }
        )['state'] if @state != 'stopped' && @context['worker_state_enabled']
      end
    end