1 |
commit: b313716f09b039957864fda3bd1e1f2b54c85586 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Apr 30 19:15:59 2018 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Apr 30 19:25:37 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=b313716f |
7 |
|
8 |
AbstractPollTask: change timeout units to seconds |
9 |
|
10 |
bin/ebuild-ipc.py | 6 +++--- |
11 |
pym/_emerge/AbstractPollTask.py | 2 +- |
12 |
2 files changed, 4 insertions(+), 4 deletions(-) |
13 |
|
14 |
diff --git a/bin/ebuild-ipc.py b/bin/ebuild-ipc.py |
15 |
index c2773cb6a..6d0cdbef9 100755 |
16 |
--- a/bin/ebuild-ipc.py |
17 |
+++ b/bin/ebuild-ipc.py |
18 |
@@ -104,7 +104,7 @@ class EbuildIpc(object): |
19 |
|
20 |
# Timeout for each individual communication attempt (we retry |
21 |
# as long as the daemon process appears to be alive). |
22 |
- _COMMUNICATE_RETRY_TIMEOUT_MS = 15000 |
23 |
+ _COMMUNICATE_RETRY_TIMEOUT = 15 # seconds |
24 |
|
25 |
def __init__(self): |
26 |
self.fifo_dir = os.environ['PORTAGE_BUILDDIR'] |
27 |
@@ -161,7 +161,7 @@ class EbuildIpc(object): |
28 |
eof = fifo_writer.poll() is not None |
29 |
|
30 |
while not eof: |
31 |
- fifo_writer._wait_loop(timeout=self._COMMUNICATE_RETRY_TIMEOUT_MS) |
32 |
+ fifo_writer._wait_loop(timeout=self._COMMUNICATE_RETRY_TIMEOUT) |
33 |
|
34 |
eof = fifo_writer.poll() is not None |
35 |
if eof: |
36 |
@@ -187,7 +187,7 @@ class EbuildIpc(object): |
37 |
eof = pipe_reader.poll() is not None |
38 |
|
39 |
while not eof: |
40 |
- pipe_reader._wait_loop(timeout=self._COMMUNICATE_RETRY_TIMEOUT_MS) |
41 |
+ pipe_reader._wait_loop(timeout=self._COMMUNICATE_RETRY_TIMEOUT) |
42 |
eof = pipe_reader.poll() is not None |
43 |
if not eof: |
44 |
if self._daemon_is_alive(): |
45 |
|
46 |
diff --git a/pym/_emerge/AbstractPollTask.py b/pym/_emerge/AbstractPollTask.py |
47 |
index 6cccb27d9..dff4b3efd 100644 |
48 |
--- a/pym/_emerge/AbstractPollTask.py |
49 |
+++ b/pym/_emerge/AbstractPollTask.py |
50 |
@@ -113,7 +113,7 @@ class AbstractPollTask(AsynchronousTask): |
51 |
tasks = [self.async_wait()] |
52 |
if timeout is not None: |
53 |
tasks.append(asyncio.ensure_future( |
54 |
- asyncio.sleep(timeout / 1000, loop=loop), loop=loop)) |
55 |
+ asyncio.sleep(timeout, loop=loop), loop=loop)) |
56 |
try: |
57 |
loop.run_until_complete(asyncio.ensure_future( |
58 |
asyncio.wait(tasks, return_when=asyncio.FIRST_COMPLETED, |