Giter VIP home page Giter VIP logo

Comments (2)

grondo avatar grondo commented on September 26, 2024

Valid request! However, this is going to be slightly tricky because of the way dependencies work and how outstanding dependencies are transmitted back to flux jobs from the job-list service.

Dependencies are represented as strings, added by a dependency-add event, then removed by a dependency-remove event. Internally, the outstanding dependencies (holding a job in the DEPEND state) are thus represented as a set of strings. For the begin-time dependency, the string is just begin-time=T, where T is floating-point seconds since the epoch, i.e. the UNIX time. When flux jobs gets the list of current dependencies, it just gets the current set of dependency strings and prints them as is. This is partially done because these dependency strings or descriptions are considered somewhat opaque and extensible.

Given these limitations, there are a couple approaches we could take:

  • Have the begin-time dependency plugin represent the time as something more human readable. This would be simplest but has the drawback that any such representation would have to pick a timezone (likely the timezone of the broker process) and use that for the representation. This may not match the user's actual timezone, so this could be confusing (but could be mitigated by appending the timezone to the description)
  • Add some special handling for begin-time dependencies in flux jobs or the underlying JobInfo class. The code would need to walk the set of dependencies looking for begin-time=. Since it is known that the remainder of the string is a timestamp, it could parse this and replace with a datetime rendered in the current timezone. This method could be extended to handle other known dependencies in the future if needed.

from flux-core.

grondo avatar grondo commented on September 26, 2024

Well patching something into JobInfo was pretty easy as a prototype.

For instance, we could show the simple begin time if the job is scheduled to run today, the date otherwise:

flux jobs
       JOBID USER     NAME       ST NTASKS NNODES     TIME INFO
   ƒ6DBbeYzK grondo   hostname    D      1      -        - depends:begin=17:11:55
   ƒ6FuQt6sH grondo   hostname    D      1      -        - depends:begin=Sep23-17:01:55

from flux-core.

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.