fix(realism): use minute-precision datetime in in_active_hours
personas.in_active_hours was discarding the minute component of the active-hours window, making "09:30-17:45" behave as "09:00-17:00". Rewrote it to delegate to diurnal.in_work_hours (which uses full minute arithmetic) and updated the scheduler caller to pass the full datetime instead of now_dt.hour.
This commit is contained in:
@@ -175,7 +175,7 @@ async def pick(
|
||||
)
|
||||
return None
|
||||
|
||||
active = [p for p in personas if in_active_hours(p, now_dt.hour)]
|
||||
active = [p for p in personas if in_active_hours(p, now_dt)]
|
||||
if len(active) < 2:
|
||||
logger.debug(
|
||||
"emailgen pick: source=%s mail_decky=%s only %d personas in-hours",
|
||||
|
||||
Reference in New Issue
Block a user