Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

Adds Stop runner / watcher button #1577

Closed
wants to merge 1 commit into from
Closed

Adds Stop runner / watcher button #1577

wants to merge 1 commit into from

Conversation

ricardojsmarques
Copy link

@ricardojsmarques ricardojsmarques commented Dec 29, 2017

Adds a stop button below gekko title.
Internally calls already defined API method killGekko.

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    This change adds a "Stop runner" button in the strat runner and market watcher individual page.

  • What is the current behavior? (You can also link to an open issue here)
    There isn't a way to stop a runner from the UI as shown in Unable to stop a market watcher or Strat runner #1306

  • What is the new behavior (if this is a feature change)?
    The added button stops the current live runner (market watcher or strat runner)

  • Other information:
    Currently the button effectively kills the live runner, but I couldn't find a way to update the list view after the runner was killed. refreshing the page effectively updates the runner lists

Adds a stop button below gekko title.
Internally calls already defined method killGekko.
@osztro
Copy link

osztro commented Jan 24, 2018

@DDrjm , I use 0.5.12 and called the killGekko endpoint from Postman. That may uses the api, but the child process runs after that. So the program keeps running the (watcher|papertrader|tradebot).
Are you aware of this? However you are right, One piece of this puzzle is to make a button available on UI.

@hilkoc
Copy link
Contributor

hilkoc commented Feb 6, 2018

@DDrjm I've build Gekko with this pull request merged in. It does remove the runners from the UI. However it does not kill the process! Like @osztro says, Gekko keeps executing trades/fetching data after clicking the stop button.

@askmike How do we correctly kill the child process?

@osztro
Copy link

osztro commented Feb 6, 2018

@hilkoc node package https://www.npmjs.com/package/tree-kill
use that to stop the gekko process
store the PID (process id ) of the gekko in the gekkoManager (the cache) and listManager. currently a randomly generated id is the key in the cache (gekkoManager)
use the existing killGekko.js as an entry point to perform the stop of the process.

@askmike
Copy link
Owner

askmike commented Feb 7, 2018

@osztro the child process currently doesn't handle graceful shutdown very well, there is some more work involved than simply killing the process to make sure we clean up DB handlers and the such.

This (most desired) functionality is planned for in the next UI release, I already have a rewritten all code that manages running gekkos (current code was alpha & spaghetti code) will push this to #1850 asap. Better to hook proper lifecycle management in there.

Apologies to @DDrjm for putting the time in to write this, but I think the best thing would be to close this for now.

@hilkoc
Copy link
Contributor

hilkoc commented Jun 22, 2018

Thanks @DDrjm , with the help of this button in the UI I managed to make a working stop button. See my last comment on #2059.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants