Coder Social home page Coder Social logo

Comments (7)

luispedro avatar luispedro commented on May 30, 2024

I find it very surprising that there is a difference between these. What exactly do you mean by "checking status"?

Can you add the --verbose=info flag and see what happens?

from jug.

chenxi-shi avatar chenxi-shi commented on May 30, 2024

Thank you for replying!
My "checking status" means the execution of "jug status exmp.py".

The subprocess code is in a file called "call_exmp.py", and the following is the print and I bold the time for your reference.

\Jug_task>python call_exmp.py
call_exmp starts: 1518618461.5917778
process 9244: ['jug', 'execute', 'exmp.py', '--will-cite', '--verbose=INFO', '--debug']
process 4060: ['jug', 'execute', 'exmp.py', '--will-cite', '--verbose=INFO', '--debug']
process 11384: ['jug', 'execute', 'exmp.py', '--will-cite', '--verbose=INFO', '--debug']
process 12916: ['jug', 'execute', 'exmp.py', '--will-cite', '--verbose=INFO', '--debug']
\Jug_task>jug status exmp.py
Start: 1518618481.4294322
Spend 0.0019981861114501953
Waiting Ready Finished Running Task name
.................................................................................................
0 3 0 2 exmp.do_something
1 0 0 0 exmp.join
.................................................................................................
1 3 0 2 Total
C:\Mywork\tasks\Jug_task>

Here is the verbose information on one process.

Start: 1518618481.130434
Spend 0.006001472473144531
INFO:root:Execute start (6 tasks)
INFO:root:Executing exmp.do_something...
0 Finished
INFO:root:Already in execution exmp.do_something...
INFO:root:Already in execution exmp.do_something...
INFO:root:Already in execution exmp.do_something...
INFO:root:Executing exmp.do_something...
6.343236446380615sec - Process 4: 1
7.344218969345093sec - Process 4: 2
8.34446907043457sec - Process 4: 3
9.345445156097412sec - Process 4: 4
4 Finished
INFO:root:Executing exmp.join...
___________________________This is join

I will also attach my test code in another comment for your reference.

from jug.

chenxi-shi avatar chenxi-shi commented on May 30, 2024

Here are the screenshots of files
call_exmp.py
call_exmp
exmp.py
exmp

Thanks!

from jug.

chenxi-shi avatar chenxi-shi commented on May 30, 2024

Updating:

This problem will be solved when I add process.poll(). It is like checking process would trigger the tasks' starting.

from jug.

luispedro avatar luispedro commented on May 30, 2024

Sorry, I cannot be more constructive, but I don't see why it shouldn't work as expected or why process.poll() would make a difference. If it's a windows thing then I cannot really help, though.

from jug.

chenxi-shi avatar chenxi-shi commented on May 30, 2024

I am working on Windows. It doesn't matter since I could just use process.poll() to trigger processes. Thanks.

from jug.

luispedro avatar luispedro commented on May 30, 2024

Closing as I don't feel I have enough information to fix any underlying issue.

from jug.

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.