Review shutDownHook and GUI

Issue #567 resolved
Desrever Nu created an issue

When stopping the bot from the UI, the bot should clear order and send out hipchat notifications. Instead those things are done on the shutdown hook only

also check the other stuff (clear liquidity etc)

Comments (4)

  1. Benjamin Cordes

    Order clearing does happen with bot shutdown and hipchat notify (see shutdownBot in NuBotbase).

  2. Desrever Nu reporter

    yep.

    So shutdown hook is ok when stopping the bot via GUI using the STOP button It is also OK when stopping a CLI session via control C It is also OK when stopping a running GUI session via control+c / kill / IDE It is NOT OK when stopping an idle GUI session via control+c / kill / IDE : it sends hipchat notifications, cancel order, clear liquidity etc, which shouldn't be performed if the bot is not turned on.

    We should work on this last case.

    In the shutdown hook we should check existance of session file. If it doesn't exist, skip unnecessary actions

  3. Log in to comment