code: def delete_scan(self, scan_id):
          
          if self.get_scan_status(scan_id) == ScanStatus.RUNNING:
              return 0
  
          try:
              del self.scan_processes[scan_id]
          except KeyError:
              logger.debug('Scan process for %s not found', scan_id)
          return self.scan_collection.delete_scan(scan_id)
docs: Deletes scan_id scan from collection.
  
          @return: 1 if scan deleted, 0 otherwise.