def delete(self, storagemodel:object, modeldefinition = None) -> bool:
        """ delete the message in queue """
        deleted = False
        if (storagemodel.id != '') and (storagemodel.pop_receipt != '') and (not storagemodel.id is None) and (not storagemodel.pop_receipt is None):
            try:
                modeldefinition['queueservice'].delete_message(storagemodel._queuename, storagemodel.id, storagemodel.pop_receipt)
                deleted = True

            except Exception as e:
                msg = 'can not delete queue message:  queue {} with message.id {!s} because {!s}'.format(storagemodel._queuename, storagemodel.id, e)
                raise AzureStorageWrapException(msg=msg)

        else:
            log.info('cant update queuemessage {} due to missing id and pop_receipt'.format(storagemodel._queuename))

        return deleted
def delete ( self , storagemodel : object , modeldefinition = None ) -> bool : deleted = False if ( storagemodel . id != '' ) and ( storagemodel . pop_receipt != '' ) and ( not storagemodel . id is None ) and ( not storagemodel . pop_receipt is None ) : try : modeldefinition [ 'queueservice' ] . delete_message ( storagemodel . _queuename , storagemodel . id , storagemodel . pop_receipt ) deleted = True except Exception as e : msg = 'can not delete queue message:  queue {} with message.id {!s} because {!s}' . format ( storagemodel . _queuename , storagemodel . id , e ) raise AzureStorageWrapException ( msg = msg ) else : log . info ( 'cant update queuemessage {} due to missing id and pop_receipt' . format ( storagemodel . _queuename ) ) return deleted
delete the message in queue