Giter VIP home page Giter VIP logo

Comments (7)

biasedbit avatar biasedbit commented on August 22, 2024 1

In case it's helpful, here's a link to the the proc_runner script I mention above.

from poethepoet.

nat-n avatar nat-n commented on August 22, 2024 1

Hi @biasedbit, thanks for the interesting issue.

Option B does seem preferable, except that it does in practice break usage of poe with some CLI tools one could want to calls via a task, some contrived examples: sl, k9s, htop.

This makes me think there should be a task option to enable it, something like separate_process_group: bool, somewhat similar to use_exec option. Would you be up for submitting a PR with that? Otherwise Ill get around to it sooner or later.

Of course for consistency adding the preexec_fn keyword argument should be done by editing the popen_kwards dictionary above, and a new option would require a test and some documentation to release.

Incidentally setting the use_exec option to you task might be a valid workaround for you?


Also a comment on the example task definition from your script, normally including poetry run in the task cmd is redundant (and adds a couple of seconds delay), because poe will work with poetry's venv automatically. And when calling a python script from inside the repo I think it's preferable to use a script task, so long as the target behaviour is contained in a function that is importable from the root directory (may require the scripts dir to be a package).

from poethepoet.

biasedbit avatar biasedbit commented on August 22, 2024 1

I'll take a stab at it over the next couple of days. Cheers!

from poethepoet.

nat-n avatar nat-n commented on August 22, 2024 1

@biasedbit all yours :)

from poethepoet.

biasedbit avatar biasedbit commented on August 22, 2024 1

Looking a bit more carefully into this, turns out use_exec already does what I needed 😅 Having my program become the primary process avoids the dual SIGINT issue since poe's no longer handling and forwarding signals.

I'm going to go ahead and close this; thanks for jumping in so quick and talking it through — and for building this really incredible tool 🙌

from poethepoet.

biasedbit avatar biasedbit commented on August 22, 2024

(Tested both changes locally and they work as expected.)

from poethepoet.

biasedbit avatar biasedbit commented on August 22, 2024

Hey @nat-n, didn't get a chance to work on this over the holidays but picking this up today — just checking in with you to make sure we don't both end up working on it at the same time.

from poethepoet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.