beforeDestroy(inst /* , opts */) {
        const promiseArr = [];

        promiseArr.push(redisOps.getSamplesFromAspectName(inst.name)
          .each((samp) => {
            if (samp) {
              publishSample(
                samp, seq.models.Subject, sampleEventNames.del,
                seq.models.Aspect
              );
            }
          })
        );

        promiseArr.push(inst.checkGeneratorReferences('delete')
        .then(() => common.setIsDeleted(seq.Promise, inst)));

        return seq.Promise.all(promiseArr);
      }
/**
       * Check Generator references and set the isDeleted timestamp.
       * If aspect is deleted then send realtime "del" event to delete all
       * samples associated with that aspect for perspectives.
       *
       * @param {Aspect} inst - The instance being destroyed
       * @returns {Promise}
       */
Check Generator references and set the isDeleted timestamp.
If aspect is deleted then send realtime "del" event to delete all
samples associated with that aspect for perspectives.

@param {Aspect} inst - The instance being destroyed
@returns {Promise}
Check Generator references and set the isDeleted timestamp . If aspect is deleted then send realtime " del " event to delete all samples associated with that aspect for perspectives . @param { Aspect } inst - The instance being destroyed @returns { Promise }
beforeDestroy(inst ) {
        const promiseArr = [];
        promiseArr.push(redisOps.getSamplesFromAspectName(inst.name)
          .each((samp) => {
            if (samp) {
              publishSample(
                samp, seq.models.Subject, sampleEventNames.del,
                seq.models.Aspect
              );
            }
          })
        );
        promiseArr.push(inst.checkGeneratorReferences('delete')
        .then(() => common.setIsDeleted(seq.Promise, inst)));
        return seq.Promise.all(promiseArr);
      }
beforeDestroy ( inst ) { const promiseArr = [ ] ; promiseArr . push ( redisOps . getSamplesFromAspectName ( inst . name ) . each ( ( samp ) => { if ( samp ) { publishSample ( samp , seq . models . Subject , sampleEventNames . del , seq . models . Aspect ) ; } } ) ) ; promiseArr . push ( inst . checkGeneratorReferences ( 'delete' ) . then ( ( ) => common . setIsDeleted ( seq . Promise , inst ) ) ) ; return seq . Promise . all ( promiseArr ) ; }
Check Generator references and set the isDeleted timestamp.
Check Generator references and set the isDeleted timestamp .
/* , opts */