Skip to content

Handle entity runner diffs cleanly #57

@lalalune

Description

@lalalune

Right now whenever anything changes (entity is marked dirty) we are attempting to destroy the entity and rebuild it... this is not happening cleanly though.

If the exact spell used by the entity is changed, we should destroy the old instance, create a new instance and attach it to the client. Ideally we don't need to destroy the client, but that might be easier. In either case we need to make sure that we aren't leaking memory or holding on to old references.

If the API key etc is changed, we'll need to completely destroy and restart that client. We want to keep the entity itself alive, but, for example, if we update Discord, we should destroy discord client and restart.

These services are meant to be long-running, so we should make sure they are starting and destroying properly and be meticulous about this.

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