function publishSampleNoChange(sample) {
  const s = {
    name: sample.name,
    status: sample.status, // for socket.io perspective filtering
    absolutePath: sample.absolutePath, // used for persp filtering
    updatedAt: sample.updatedAt,
    subject: {
      absolutePath: sample.absolutePath,
      tags: sample.subjectTags, // for socket.io perspective filtering
    },
    aspect: {
      name: sample.aspectName, // for socket.io perspective filtering
      tags: sample.aspectTags, // for socket.io perspective filtering
      /*
       * aspect.timeout is needed by perspective to track whether page is still
       * getting real-time events
       */
      timeout: sample.aspectTimeout,
    },
  };
  return Promise.resolve(true)
  .then(() => {
    publishObject(s, sampleEvent.nc);
    return sample;
  });
} // publishSampleNoChange
/**
 * Publish a sample when nothing changed except last update timestamp.
 *
 * @param  {Object} sample - The sample to be published
 * @returns {Promise} - which resolves to the object that was published
 */
Publish a sample when nothing changed except last update timestamp.
@param  {Object} sample - The sample to be published
@returns {Promise} - which resolves to the object that was published
Publish a sample when nothing changed except last update timestamp . @param { Object } sample - The sample to be published @returns { Promise } - which resolves to the object that was published
function publishSampleNoChange(sample) {
  const s = {
    name: sample.name,
    status: sample.status, 
    absolutePath: sample.absolutePath, 
    updatedAt: sample.updatedAt,
    subject: {
      absolutePath: sample.absolutePath,
      tags: sample.subjectTags, 
    },
    aspect: {
      name: sample.aspectName, 
      tags: sample.aspectTags, 
      timeout: sample.aspectTimeout,
    },
  };
  return Promise.resolve(true)
  .then(() => {
    publishObject(s, sampleEvent.nc);
    return sample;
  });
} 
function publishSampleNoChange ( sample ) { const s = { name : sample . name , status : sample . status , absolutePath : sample . absolutePath , updatedAt : sample . updatedAt , subject : { absolutePath : sample . absolutePath , tags : sample . subjectTags , } , aspect : { name : sample . aspectName , tags : sample . aspectTags , timeout : sample . aspectTimeout , } , } ; return Promise . resolve ( true ) . then ( ( ) => { publishObject ( s , sampleEvent . nc ) ; return sample ; } ) ; }
Publish a sample when nothing changed except last update timestamp.
Publish a sample when nothing changed except last update timestamp .
// for socket.io perspective filtering // used for persp filtering // for socket.io perspective filtering // for socket.io perspective filtering // for socket.io perspective filtering /*
       * aspect.timeout is needed by perspective to track whether page is still
       * getting real-time events
       */ // publishSampleNoChange