def cleanup()

in job-worker/npm_job_worker.py [0:0]


def cleanup(npmconfigfile, tempdir):
    try:
      os.remove(npmconfigfile)
      shutil.rmtree(tempdir)
      subprocess.call(["npm", "cache", "clean"])
      homedir = os.path.expanduser('~')
      npmcache = homedir + '/.npm'
      shutil.rmtree(npmcache)
    except Exception as e:
      print("Received error when attempting to clean up: %s" % str(e))
      raise