Skip to content

Comments

Compress test logs before sending them to the web server#117

Merged
anfimovdm merged 6 commits intoclfrom
add_logs_compression
Feb 26, 2025
Merged

Compress test logs before sending them to the web server#117
anfimovdm merged 6 commits intoclfrom
add_logs_compression

Conversation

@anfimovdm
Copy link
Contributor

No description provided.

@anfimovdm anfimovdm force-pushed the add_logs_compression branch 2 times, most recently from 03c02f7 to 69d40e0 Compare February 13, 2025 22:28
@anfimovdm anfimovdm marked this pull request as draft February 14, 2025 08:58
@anfimovdm anfimovdm force-pushed the add_logs_compression branch from 69d40e0 to 7ee1368 Compare February 16, 2025 17:02
@anfimovdm anfimovdm marked this pull request as ready for review February 16, 2025 17:23
@anfimovdm anfimovdm force-pushed the add_logs_compression branch from 7ee1368 to 96acdfb Compare February 16, 2025 22:51
@anfimovdm anfimovdm force-pushed the add_logs_compression branch from 96acdfb to 6ca8639 Compare February 17, 2025 10:24
@anfimovdm anfimovdm marked this pull request as draft February 18, 2025 19:17


def wait_bg_process(future: Future, timeout: int):
# For some reason, plumbum.commands.modifiers.Future.wait method
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, interesting. Which version of plumbum? I'm on 1.8.2 and everything looks fine here, see:

>>> runner = ( local['tail'].with_env(FOO='bar').run_bg(args=['-f', '/dev/null'], timeout=2, retcode=None,) )
>>> runner.wait()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jhernandez/sandbox/python/paramiko/env/lib64/python3.10/site-packages/plumbum/commands/modifiers.py", line 43, in wait
    self._returncode, self._stdout, self._stderr = run_proc(
  File "/home/jhernandez/sandbox/python/paramiko/env/lib64/python3.10/site-packages/plumbum/commands/processes.py", line 299, in run_proc
    return _check_process(proc, retcode, timeout, stdout, stderr)
  File "/home/jhernandez/sandbox/python/paramiko/env/lib64/python3.10/site-packages/plumbum/commands/processes.py", line 17, in _check_process
    proc.verify(retcode, timeout, stdout, stderr)
  File "/home/jhernandez/sandbox/python/paramiko/env/lib64/python3.10/site-packages/plumbum/machines/base.py", line 15, in verify
    raise ProcessTimedOut(
plumbum.commands.processes.ProcessTimedOut: ('Process did not terminate within 2 seconds', ['/usr/bin/tail', '-f', '/dev/null'])

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it works in that way, but when you're trying to run a background process in celery or multiprocessing.Pool run_bg doesn't take timeout into account

@anfimovdm anfimovdm marked this pull request as ready for review February 26, 2025 17:53
@anfimovdm anfimovdm merged commit afdece0 into cl Feb 26, 2025
2 checks passed
@anfimovdm anfimovdm deleted the add_logs_compression branch February 26, 2025 17:56
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

Successfully merging this pull request may close these issues.

3 participants