Skip to content

[Question] Necessary to check IsReplaying before SetCustomStatus? #1764

Answered by cgillum
colbylwilliams asked this question in Q&A
Discussion options

You must be logged in to vote

It's not necessary to check for IsReplaying.

The SetCustomStatus API doesn't actually do any I/O at the time you call it. Rather, it just updates some in-memory state. The I/O happens at the point where we checkpoint the updated instance history (usually the next await statement). Only the data saved in the last SetCustomStatus call will get persisted. This also means that you'll never see a "Creating Project" status when querying the instance status, even if the query happens mid-replay.

Does that help clarify?

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by cgillum
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1240 on April 01, 2021 17:39.