mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-10-04 01:02:12 +00:00
refactor(send): apply ponytail audit cuts 2, 4, 6
- updated_sequence_task: clone the Task and mutate the two fields instead of rebuilding all 12 by hand (-22 lines; new fields no longer need a sync here) - unify unix_now with db::now_f64 (unix_now() = now_f64() as i64), moved to db.rs next to its clock source - classify_to_send_error takes the MediaFetchFailure label, folding the duplicated inline match in send_batch_via_upload (-8 lines)
This commit is contained in:
@@ -160,3 +160,9 @@ pub fn now_f64() -> f64 {
|
||||
.map(|d| d.as_secs_f64())
|
||||
.unwrap_or(0.0)
|
||||
}
|
||||
|
||||
/// Unix timestamp in whole seconds. Same clock as [`now_f64`], for fields
|
||||
/// that store integer seconds (chat-state expiry, edit prompts).
|
||||
pub fn unix_now() -> i64 {
|
||||
now_f64() as i64
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user