<commit_before>containers    = $(".ontology-version-state")
final_states  = ["done", "failed"]
poll_time = 3000 # milliseconds

return if _.isEmpty(containers) || !containers.length

update = (container) ->
  updateContainer = (container) ->
    current_state = container.data('state')

    $.getJSON container.data('uri'), (data) ->
      state = data.state

      if state == current_state && !_.contains(final_states, state)
        enqueue(container)
      else
        current_state = state

        # display the new state<commit_msg>Read correct field for state update.<commit_after>containers    = $(".ontology-version-state")
final_states  = ["done", "failed"]
poll_time = 3000 # milliseconds

return if _.isEmpty(containers) || !containers.length

update = (container) ->
  updateContainer = (container) ->
    current_state = container.data('state')

    $.getJSON container.data('uri'), (data) ->
      state = data.evaluation_state

      if state == current_state && !_.contains(final_states, state)
        enqueue(container)
      else
        current_state = state

        # display the new state
{'fraction_non_alphanumeric': 0.13016157989228008, 'fraction_numerical': 0.00718132854578097, 'mean_word_length': 3.3385214007782102, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3223216', 'n_tokens_mistral': 327, 'n_tokens_neox': 310, 'n_words': 76}