@wmfs/tymly
Version:
A framework for building and sharing workflows in Node.js
13 lines (11 loc) • 382 B
JavaScript
module.exports = class ClearConfiguredRegistryKey {
init (resourceConfig, env) {
this.registry = env.bootedServices.registry
this.key = resourceConfig.key
}
run (event, context) {
this.registry.clear(this.key)
.then(() => context.sendTaskSuccess())
.catch(err => context.sendTaskFailure({ error: 'ClearConfiguredRegistryKeyFail', cause: err }))
}
}