coherence-community / oracle-bedrock

Oracle Bedrock
Other
55 stars 31 forks source link

RemotePlatform and RemoteApplications should automatically clean up tmp files when closing #331

Closed brianoliver closed 8 years ago

brianoliver commented 8 years ago

As a developer I expect that any temporary files created during deployment of a remote application are automatically cleaned up when said remote applications are closed (excluding any that are created for caching purposes)

brianoliver commented 8 years ago

Perhaps to achieve this, as part of making a deployment we should dynamically create a "CleanUp" Collector Option that can collect CleanUp Options like "RemoveDirectory" and "RemoveFile".

Additionally we'd add an "onClosed" callback or "undeploy" to the Deployer interface, allowing these CleanUp Options to be used for cleaning up.

When the Application and/or Platform closes, we could then ask the Deployer to undeploy, thus causing the Application(s) to clean themselves up. Alternatively we could make a Deployer an implicit Profile to receive such callbacks.

brianoliver commented 8 years ago

Completed initial implementation for SSH-based remote platforms. Further multi-platform and terminal testing may be required.