-
-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor time.rs
to make the code logic the same as others.
#347
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #347 +/- ##
==========================================
+ Coverage 63.42% 63.68% +0.26%
==========================================
Files 25 25
Lines 1572 1589 +17
==========================================
+ Hits 997 1012 +15
- Misses 575 577 +2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple questions, but otherwise looks good
Sorry, I hadn’t used that feature before and misread the docs when I pulled them up the first time. I’m in agreement, looks good.
|
dc3e3fa
to
89f27a7
Compare
Looks like chronic changed their time interface. Can you fix that well you're already in there for this PR? @Dirreke |
Which choice do you prefer if the duration time as millis exceed i64::MAX? |
Head branch was pushed to by a user without write access
Let’s return an error, similar to how the size trigger does it |
eb9a7bd
to
1db6e18
Compare
I will fix it tomorrow. |
1db6e18
to
0b8f045
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make sure to bump the minimum required chrono.
1db83e0
to
df5e6a5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! 🎉
Is there any progress about this PR? |
I’m communicating with the repo owner to get this merged in. It’s g2g from me. |
Got it, hopes it will be soon and thanks for your great work. |
next_time + Duration::seconds(random_delay as i64) | ||
} else { | ||
next_time | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I close this consersation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The answer to this is tied into the "wondering" question. Lets wait until estk is back next week. Let's target issues first for future efforts to ensure implications and impacts are considered up front.
let result = time | ||
+ Duration::try_hours(increment) | ||
.ok_or(TimeTrigerError::TooLargeInterval(interval))?; | ||
return Ok(result); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please refactor this and other instances into a helper function:
let dur = try_from_hours(increment)?;
return Ok(time + dur);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about using macros?
Wondering the reason for this:
|
If we build it in program instead of config file, we have to build |
df5e6a5
to
0e56e18
Compare
29d8dbd
to
e475695
Compare
e475695
to
d0d35b8
Compare
Awesome, any update? 🥳 |
@carlocorradini The owner of the repo requested that we break up this PR into separate pieces.
This will allow the changes to be analyzed independently and makes the impact of each change more easily tracked. @Dirreke Have you been able to work on breaking number 2 out into a separate PR? |
Thanks for that. However, I'm a little busy these days. Maybe I will do it next week. Or maybe I can rebase it after #367 merged |
Firstly, awesome 😎 |
TimeTriggerConfig
for lib withoutconfig_parsing
feature.trigger()
execution