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

hivemind fails to start some processes properly, but foreman works as expected #29

Closed
todd-a-jacobs opened this issue Apr 20, 2022 · 2 comments

Comments

@todd-a-jacobs
Copy link

Summary

The following Procfile works properly with foreman 0.87.2, but fails to execute both processes when called with hivemind 1.1.0 as installed via Homebrew. Go reports itself as go version go1.18.1 darwin/amd64.

Procfile

yard: open -a Safari.app http://localhost: 8088
coverage: open -a Safari.app coverage/index.html

Failures from Hivemind

With foreman start, a PID is created for each browser process, and the relevant pages are opened in Safari. However, with hivemind ./Procfile the first process starts correctly even though hivemind thinks it has immediately exited. The second process (coverage) never runs, and reports:

coverage: Running
yard: Running...
yard: Process exited
coverage: Interrupting...
coverage: Signal: interrupt

This intuitively seems to be an issue with jobs that fork or share a parent process, since in actuality the YARD server (started separately by Guard in this case) continues to run, but hivemind seems to think that because open has exited it should not start or continue the other defined processes defined in the Procfile.

If there's a work-around, or if I've misunderstood the documentation, please let me know. Otherwise, this seems like a bug for anything that might spawn background processes or have non-interdependent processes that should not fail to start or continue to run simply because another named process within the Procfile did.

@asmrtfm
Copy link

asmrtfm commented Sep 15, 2024

My issue feels tangentially related so here's what I've got:

I was using foreman. It is still installed. (should I have removed it first?)

Procfile:

web: bin/rails server
css: bin/rails tailwindcss:watch

❱ gem install hivemind

Successfully installed hivemind-0.1
Parsing documentation for hivemind-0.1
Done installing documentation for hivemind after 0 seconds
1 gem installed

( I also added it to the development, test group in my Gemfile, and ran bundle install - no errors, no impact on the following outputs )

❱ hivemind

hivemind
runs the file
hivemind render <new_filename>
renders the source with

❱ hivemind Procfile

file doesn't specify a syntax

( the README does not mention anything about syntax )

( I'm on ubuntu-22.04 running ruby 3.2.4 via asdf )

@DarthSim
Copy link
Owner

@todd-a-jacobs I doubt that this issue is actual after 2 years, but you can use the -W flag of open. This flag makes open wait until the requested application is closed.

@asmrtfm Hivemind doesn't have a Ruby gem. What you actually installed with gem install hivemind is https://github.com/alehander92/hivemind

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

3 participants