#NEWLINE# @ ComputedGraph . Function #NEWLINE# def trigger( self ) : #NEWLINE# #INDENT# if ( self . successOrError is not None ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if ( self . computedValue . valueIVC is None ) : #NEWLINE# #INDENT# self . successOrError = { #NEWLINE# #INDENT# 'success' : False , #NEWLINE# 'message' : 'Tried to trigger write before calculation was finished.' , #NEWLINE# #UNINDENT# } #NEWLINE# return #NEWLINE# #UNINDENT# if ( not self . computedValue . valueIVC . isVectorOfChar ( ) ) : #NEWLINE# #INDENT# self . successOrError = { #NEWLINE# #INDENT# 'success' : False , #NEWLINE# 'message' : 'Result should have been a string.' , #NEWLINE# #UNINDENT# } #NEWLINE# return #NEWLINE# #UNINDENT# if self . computedValue . isException : #NEWLINE# #INDENT# self . successOrError = { #NEWLINE# #INDENT# 'success' : False , #NEWLINE# 'message' : 'Result should have been a string. Got an exception instead.' , #NEWLINE# #UNINDENT# } #NEWLINE# return #NEWLINE# #UNINDENT# def callback( result ) : #NEWLINE# #INDENT# if result . isSuccess ( ) : #NEWLINE# #INDENT# self . successOrError = { #NEWLINE# #INDENT# 'success' : True , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . successOrError = { #NEWLINE# #INDENT# 'success' : False , #NEWLINE# 'message' : str ( result ) , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# #UNINDENT# ComputedValueGateway . getGateway ( ) . createExternalIoTask ( CumulusNative . ExternalIoTask . WriteCharBigvecToS3 ( self . computedValue . valueIVC . getVectorBigvecGuid ( ) , CumulusNative . S3KeyAndCredentials ( callback . bucketname , self . keyname , '' , '' , '' ) ) , callback )