npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

soap-htcondor

v1.0.1

Published

A wrapper for consuming HTCondor soap API

Downloads

7

Readme

Soap-Htcondor

A wrapper for consuming HTCondor soap API Check HTCondor manual

Installation

You can install this package by running in the command line the following command:

$ npm install soap-htcondor --save

HTCondor config

Update HTCondor config file to accept incoming SOAP requests at port 8080.

/etc/condor/config.d/condor_config.local

ENABLE_SOAP = TRUE
ALLOW_SOAP = *
QUEUE_ALL_USERS_TRUSTED = TRUE
SCHEDD_ARGS = -p 8080
SOAP_LEAVE_IN_QUEUE = ((JobStatus==4) && ((ServerTime - CompletionDate) < (60 * 60 * 24)))
HOSTALLOW_WRITE = *
#NETWORK_INTERFACE = eth1

Restart the HTCondor service

sudo service condor restart

And then, check if it works running:

condor_status -schedd -constraint "HasSOAPInterface=?=TRUE"

or

nc localhost 8080 <<EOF
POST / HTTP/1.1
User-Agent: whatever
Content-Type: text/xml; charset=utf-8
SOAPAction: ""

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:ns="urn:condor">
 <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
     <ns:getVersionString />
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
EOF

This package expose two Classes, Collector and Scheduler, the first one has every method for query HTCondor about Jobs status, Machine stats or even platform and version of the program.

Condor Collector

Query HTCondor for information like SubmittorAds, MasterAds, Platform and Version strings, etc

| Methods | |-----------------| |getVersionString| |getPlatformString| |insertAd| |queryStartdAds| |queryScheddAds| |queryMasterAds| |querySubmittorAds| |queryLicenseAds| |queryStorageAds| |queryAnyAds|

Condor Schedduler

The scheduller has everything that you need for the manage of the HTCondor Jobs

| Methods | |-----------------| |getVersionString| |getPlatformString| |beginTransaction| |commitTransaction| |abortTransaction| |extendTransaction| |newCluster| |removeCluster| |newJob| |removeJob| |holdJob| |releaseJob| |submit| |getJobAds| |getJobAd| |declareFile| |sendFile| |getFile| |closeSpool| |listSpool| |requestReschedule| |discoverJobRequirements| |createJobTemplate|

Check HTCondor version


var HTCondor = require("soap-htcondor")
var join = require("path").join

var htcondor = new HTCondor({url:"http://localhost:8080/", wsdl : join(__dirname, "wsdl", "condorCollector.wsdl")});

htcondor.createCollector(function(err, client){
  client.getVersionString({}, function(err, result) {
      if (err) {
          console.log("Error al conectar");
          return;
      }
      console.log(result);
  });
})

Submiting a Job

var HTCondor = require("soap-htcondor")
var join = require("path").join

var htcondor = new HTCondor({url:"http://localhost:8080/", wsdl : join(__dirname, "wsdl", "condorSchedd.wsdl")});

var job = {
    universe: "VANILLA",
    executable: "/bin/sleep",
    arguments: "31",
    notification: "never",
    owner: "rooot",
    type: "5",
    requirements: 'TRUE',
    shouldtransferfiles: "yes",
    when_to_transfer_output: "ON_EXIT",
    out: "example1.out",
    err: "example1.err",
    log: "example1.log",
    iwd: "/tmp",
    queue: 1
};

htcondor.createSchedduler(function(err, schedd){
   if(err){
    console.log("Error al crear Schedd", err)
    return;
   }

   schedd.createJob(job, function(err, job){
       if(err){
         console.log("Error al enviar job",err)
         return
       }
       console.log(job)
   })
})

Submiting a Workflow

Submiting a Docker Job

Checking for a Job Status

Testing