mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-08 05:31:56 +00:00
removed functions from uninstall that may have been causing errors during the uninstall process; added an initializer for the atomicState.eventBuffer on update if it's whiped away; added a check for access key in createBucket to make the function more idempotent
This commit is contained in:
@@ -242,22 +242,26 @@ def updated() {
|
||||
if (atomicState.bucketKey != null && atomicState.accessKey != null) {
|
||||
atomicState.isBucketCreated = false
|
||||
}
|
||||
|
||||
if (atomicState.eventBuffer == null) {
|
||||
atomicState.eventBuffer = [];
|
||||
}
|
||||
|
||||
subscribeToEvents()
|
||||
|
||||
log.debug "updated (version $atomicState.version)"
|
||||
}
|
||||
|
||||
def uninstalled() {
|
||||
unsubscribe()
|
||||
unschedule()
|
||||
log.debug "uninstalled (version $atomicState.version)"
|
||||
}
|
||||
|
||||
def createBucket() {
|
||||
|
||||
if (!atomicState.bucketName) {
|
||||
atomicState.bucketName = atomicState.bucketKey
|
||||
atomicState.bucketName = atomicState.bucketKey;
|
||||
}
|
||||
if (!atomicState.accessKey) {
|
||||
return;
|
||||
}
|
||||
def bucketName = "${atomicState.bucketName}"
|
||||
def bucketKey = "${atomicState.bucketKey}"
|
||||
|
||||
Reference in New Issue
Block a user