timofurrer / minion-ci

minimalist, decentralized, flexible Continuous Integration Server for hackers.
MIT License
43 stars 4 forks source link

add stop commando as mentioned in issue: #5 #13

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hi @timofurrer,

thanks for pulling the my first pr! Here is the second, this should fix issue #5 . It still needs some unit tests. I am planning on taking up that issue next.

I placed the stop_server code in server/core.py I am not sure if this is the right place? Would you prefer it somewhere else?

Thanks! 💯

timofurrer commented 7 years ago

Could you also document the new POST /stop route in the README? See table at the end. Thanks!

ghost commented 7 years ago

Ok, I did some pondering on handling the still running jobs.

on line 47 you define workers = WorkersExtension() . I am not sure if I am even in the right direction but what I have in my code now does kill the server and in my theory it also stops the running subprocesses. I added workers.pool.close() to the top of stop_server()

I haven't done a commit yet, because I am not sure if this even does what I think it does. Any thoughts on this?

timofurrer commented 7 years ago

It should according to the documentation. Just push your change and I can verify it if it really works.

ghost commented 7 years ago

@timofurrer Cool, my last commit should fix #5

timofurrer commented 7 years ago

Looks good! I'll merge. Thanks :beer: