<commit_before>from flow.protocol.message import Message

class UpdateMessage(Message):
    required_fields = {
            'net_key': basestring,
            'operation_id': int,
            'color': int,
            'name': basestring,
            'workflow_plan_id': int,
     }

    optional_fields = {
            'parent_net_key': basestring,
            'parent_operation_id': int,
            'parent_color': int,
            'peer_net_key': basestring,
            'peer_operation_id': int,
            'peer_color': int,
            'parallel_index': int,
            # is this a subworkflow: i.e. DV2, etc.
            # obviously we can't inspect environment variables here to determine
            # that.
            'is_subflow': bool,
            'status': basestring,
            'dispatch_id': basestring,
            'user_name': basestring,
            'start_time': basestring,
            'end_time': basestring,
            'stdout': basestring,
            'stderr': basestring,
            'exit_code': int,
    }<commit_msg>make status required on the historian message<commit_after>from flow.protocol.message import Message

class UpdateMessage(Message):
    required_fields = {
            'net_key': basestring,
            'operation_id': int,
            'color': int,
            'name': basestring,
            'status': basestring,
            'workflow_plan_id': int,
     }

    optional_fields = {
            'parent_net_key': basestring,
            'parent_operation_id': int,
            'parent_color': int,
            'peer_net_key': basestring,
            'peer_operation_id': int,
            'peer_color': int,
            'parallel_index': int,
            # is this a subworkflow: i.e. DV2, etc.
            # obviously we can't inspect environment variables here to determine
            # that.
            'is_subflow': bool,
            'dispatch_id': basestring,
            'user_name': basestring,
            'start_time': basestring,
            'end_time': basestring,
            'stdout': basestring,
            'stderr': basestring,
            'exit_code': int,
    }

# XXX use validate or data clumps for net_key/operation_id/color combinations.
{'fraction_non_alphanumeric': 0.09945750452079566, 'fraction_numerical': 0.0009041591320072332, 'mean_word_length': 1.7766624843161858, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5090044', 'n_tokens_mistral': 623, 'n_tokens_neox': 625, 'n_words': 149}