hakq icon indicating copy to clipboard operation
hakq copied to clipboard

Better input method

Open hakluke opened this issue 5 years ago • 5 comments

Currently, jobs are just copy/pasted into the server terminal. It would be good to have something more intuitive.

hakluke avatar Jul 15 '20 06:07 hakluke

Can you please explain what do you mean by intuitive?

mzfr avatar Jul 16 '20 07:07 mzfr

Firstly I want to be able to add jobs to the queue from external programs/scripts at any point. While it is accepting stdin, this can't really happen, except in the initial boot of the server. I'm thinking maybe the server could constantly poll a file for new lines, and then it consumes each line as a job?

hakluke avatar Jul 17 '20 03:07 hakluke

Actually a much cleaner method would be if the server worked as an API, and you could send it jobs via HTTP

hakluke avatar Jul 17 '20 03:07 hakluke

so like if we run a server there would be an endpoint say /sendcmd which would accept the command from its clients and then will add those commands to queue.

Yes, I think this would be a nice way to do it this way we can have multiple endpoints for various other actions. Like we can add an endpoint named /stats which would return the metrics(as mentioned in #5 )

mzfr avatar Jul 17 '20 08:07 mzfr

Yes! I really, really love this idea @mzfr

hakluke avatar Jul 20 '20 01:07 hakluke