Skip to content

Outstanding task on client but hub says completed #294

@drevicko

Description

@drevicko

Edit: Looks like there's a race condition where Client.outstanding is updated with a message id after the reply has already been received and processed, probalby here and here. See second comment below...

I was trying to purge_everything but got a RuntimeError: Can't purge outstanding tasks: ....

Here's an investigation of the offending task:

print(cli.outstanding)
print('6bee8602-ca584ac7aa23ca16738f43a0' in cli.history, '6bee8602-ca584ac7aa23ca16738f43a0' in cli.results)
print(cli.result_status('6bee8602-ca584ac7aa23ca16738f43a0'))
print(cli.get_result('6bee8602-ca584ac7aa23ca16738f43a0'))
print(cli.db_query({"msg_id":'6bee8602-ca584ac7aa23ca16738f43a0'}))

produces:

{'6bee8602-ca584ac7aa23ca16738f43a0'}
True False
{'pending': [], 'status': 'ok', 'completed': ['6bee8602-ca584ac7aa23ca16738f43a0']}
<AsyncHubResult: unknown>
[]

I'm happy to attempt more detailed debug info if someone can provide suggestions on how to do it.

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