Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Command auto-reloading and snapshotting #87

Open
sr229 opened this issue Aug 1, 2017 · 1 comment
Open

Command auto-reloading and snapshotting #87

sr229 opened this issue Aug 1, 2017 · 1 comment

Comments

@sr229
Copy link
Contributor

sr229 commented Aug 1, 2017

This is a new specification for Clara's Command Holder. Designated as Command Holder Revision 3 slated for 0.5.0 Sparkling Satania.

The Autoreload system

The command holder inspects a command folder's contents and if it sees a file change on the main file or it's dependents, it enforces a hot auto-reload. This should be only logged at the console and silent from the Discord side.

Snapshot system

This is in par with the autoreload system. once the CommandHolder detects there is a file change, it quickly saves the previously-loaded command object and "snpashots" it and stores on a volatile storage. It has two conditions, if the newer command object successfully inits and works without errors, the snapshotted object is discarded however if the newer command object fails to load properly, the Command Holder has to use the "last known good snapshot" of the command object.

@sr229 sr229 added this to the 0.5.0 milestone Aug 1, 2017
@sr229 sr229 added the Critical label Aug 1, 2017
@sr229
Copy link
Contributor Author

sr229 commented Aug 9, 2017

Please be noted we'll handle the snapshots under a different class named Snapshotter. This would be the module that the CommandHolder would dump the previous version of the command object after it has hot reloaded the latest revision. Only allow one copy of the object per command

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants