hi!

yet another small cli utility you might find useful if you work cross 
environments,

*cct* lets you run multiple commands concurrently, then wait for their 
completion.

where the two interesting commands are
$ cct -add $bucket $cmd$ cct -wait [-verbose] [-keep] [-immediate] [-json] 
$bucket


example,

cct -add 1 ls -al
cct -add 1 sleep 10
cct -add 1 sleep 5
cct -wait -json -keep -immediate 1
cct -wait 1

It certainly was a pretext to play with channels :p

It works by attaching cmds to a bucket, 
then this bucket is studied to know when its time to exit.

The program spawns an http server in the backend, that one runs in background, 
it is able to auto exit,
it is responsible to execute the commands.
The add commands just do a POST http request on the backend for queuing, it 
returns immediately.
The wait command queries the task to the http backend, then returns it.
When you don t use -immediate, it block until all cmds finished.
When you combine -immediate -keep -json you can have a report status 
of the various processes being run in the bucket.
If you don t provide -json, it just shows tasks output.

its here https://github.com/mh-cbon/cct!

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to