Giter VIP home page Giter VIP logo

Comments (4)

leandro-lucarella-frequenz avatar leandro-lucarella-frequenz commented on June 3, 2024 2

I'd remove the "Maybe it would be also worth clarifying that " ;)

from frequenz-api-dispatch.

thomas-nicolai-frequenz avatar thomas-nicolai-frequenz commented on June 3, 2024 1

Oh, sorry I've improved the above.

from frequenz-api-dispatch.

llucax avatar llucax commented on June 3, 2024

Maybe it would be also worth clarifying that this is a duration within one run if it is a recurring dispatch. It is not related to the recurrence itself.

from frequenz-api-dispatch.

thomas-nicolai-frequenz avatar thomas-nicolai-frequenz commented on June 3, 2024

@leandro-lucarella-frequenz how about?

message Dispatch {
  // ...

-  // Duration in seconds
+  // Duration of the dispatch in seconds. 
+  //
+  // The duration specifies how long each occurrence of the dispatch lasts during 
+  // a single run, applies only to the individual instance and not the overall cycle of 
+  // recurring dispatches. This setting is independent of the recurrence pattern, 
+  // which is governed by separate recurrence settings.
+  // 
+  // !!! note
+  //     This field manages how long each occurrence of the dispatch lasts:
+  //     - `null` value indicates an infinite duration, meaning each dispatch occurrence 
+  //.      continues indefinitely.
+  //     - A value of `0` indicates a one-time execution for that particular occurrence, 
+  //       which does not repeat or persist beyond its initial run.
+  //     - Positive values specify the duration in seconds for each dispatch occurrence 
+  //       should be active.
+  //
+  //     Example of how to set duration
+  //         duration_seconds: { value: 3600 } // Duration of 1 hour
+  //         duration_seconds: null // Infinite duration
+  //         duration_seconds: { value: 0 } // One-time execution    
+  //
- //    uint32 duration = 7;
+ //  optional uint32 duration_seconds = 7;
}

The duration parameter is renamed to duration_seconds so its more distinct from the recurrence pattern settings, ensuring that there's less confusion between the duration of individual runs and the overall scheduling pattern. Moreover, at the top it explicitly states that the duration_seconds applies to each individual occurrence of the dispatch.

from frequenz-api-dispatch.

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.