nickstenning / honcho

Honcho: a python clone of Foreman. For managing Procfile-based applications.

Home Page:http://pypi.python.org/pypi/honcho

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Honcho on Windows opens 3 terminal windows

oTree-org opened this issue · comments

I have a Procfile with 3 commands. When I run honcho start on Linux or OSX, I get the combined output of the 3 commands in my terminal window, as expected:

~home$ honcho start
12:30:17 system    | workerA.1 started (pid=812)
12:30:17 system    | workerB.1 started (pid=813)
12:30:17 system    | web.1 started (pid=814)
12:30:23 workerA.1 | /usr/local/lib/python3.5/site-packages/django/core/management/base.py:260: RemovedInDjango19Warning: "requires_model_validation" is deprecated in favor of "requires_system_checks".
12:30:23 workerA.1 |   RemovedInDjango19Warning)
12:30:23 workerA.1 | 
12:30:23 workerA.1 | [WARNING|2016-04-18 03:30:23,114] py.warnings > /usr/local/lib/python3.5/site-packages/django/core/management/base.py:260: RemovedInDjango19Warning: "requires_model_validation" is deprecated in favor of "requires_system_checks".
12:30:23 workerA.1 |   RemovedInDjango19Warning)
12:30:23 workerA.1 | 
12:30:23 workerB.1 | 2016-04-18 03:30:23,993 - INFO - runworker - Running worker against channel layer default (asgi_redis.RedisChannelLayer)
12:30:24 workerB.1 | Traceback (most recent call last):
12:30:24 workerB.1 |   File "/usr/local/lib/python3.5/site-packages/redis/connection.py", line 439, in connect
12:30:24 workerB.1 |     sock = self._connect()
12:30:24 workerB.1 |   File "/usr/local/lib/python3.5/site-packages/redis/connection.py", line 494, in _connect
12:30:24 workerB.1 |     raise err
12:30:24 workerB.1 |   File "/usr/local/lib/python3.5/site-packages/redis/connection.py", line 482, in _connect
12:30:24 workerB.1 |     sock.connect(socket_address)
12:30:24 workerB.1 | ConnectionRefusedError: [Errno 61] Connection refused
12:30:24 workerB.1 | 
12:30:24 system    | workerB.1 stopped (rc=1)
12:30:24 system    | sending SIGTERM to workerA.1 (pid 812)
12:30:24 system    | sending SIGTERM to web.1 (pid 814)
12:30:24 system    | workerA.1 stopped (rc=-15)
12:30:24 system    | web.1 stopped (rc=-15)

However, when I execute the same command on Windows, it pops up several black DOS windows, one for each command in my Procfile. Rather than showing the unified output like in the pasted example above, each command's output is only shown in its own window. I don't like this because when one process crashes, its window closes right away before I can read the traceback. Also, I find it is not very usable to manage all these different windows.

Also, if one black window crashes, the PowerShell window I used to launch foreman start now keeps outputting this line repeatedly, until I close all black windows:

2:44:26 system   | sending SIGKILL to web.1 (pid 7972)

I tested on Windows 8 and 10, and using CMD or PowerShell; same issue.

Is this by design that Windows behaves differently here? Is there a way I can get the output more consistent with Unix? (This same behavior also occurs with Foreman and forego.)

The behaviour seen on Windows is due to how processes are started.

Does anyone know how to start processes similar to Linux/OSX?

I noticed the same and opened a pull request for that: #207

Huh. As it happens I do now have a Windows machine I can test on. I'll take a look. Thank you @benediktarnold.

Would love to see the fix for this get merged.

Closed by #207.