Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run a task which may need more time than the SSH time out? #32

Open
don2ccc opened this issue Sep 20, 2019 · 1 comment
Open

Comments

@don2ccc
Copy link

don2ccc commented Sep 20, 2019

Hello Sir @href

Like say, I have below task defined, you can see there has "async" added.
this is because the ".run.sh" will takes very long time, usually about 3 minutes, it is for start our app server. after added async option, it works good from cli.

How can I do the same with Suitable API? could you advise me?

- name: APP START
      shell: ./run.sh
      async: 1000
      poll: 0
      register: start_process
      args:
        chdir: /path/to/some/where/
      notify:
      - check_status

Thanks a lot!

@href
Copy link
Contributor

href commented Sep 23, 2019

Having never used async I had a look at this and it turns out that Suitable doesn't support this at the moment. I'm not sure I'll implement this any time soon, so for now I see three options:

  • Increase your SSH timeout, if you are hitting it the limit.
  • Start the app in a separate thread, if you want concurrency.
  • Turn your app into a systemd service and start it using --no-block, then check on it later.

But Suitable doesn't have an integrated answer for you yet. I'll keep this issue open until Suitable itself supports it, but this won't be anytime soon.,

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

No branches or pull requests

2 participants