Skip to content

Improve context getting #6

@mwvaughn

Description

@mwvaughn

Almost all SD2E actors have the following boilerplate code in their reactor.py

    mes = AttrDict(rx.context.message_dict)
    if mes == {}:
        try:
            jsonmsg = json.loads(rx.context.raw_message)
            mes = jsonmsg
        except Exception:
            pass

The rationale for this is that agavepy.actors#get_context fails to deserialize some JSON messages due to valid characters in the message that cannot be parsed by ast.literal_eval(text) (see https://github.com/TACC/agavepy/blob/master/agavepy/actors.py#L65)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions