perf: only load id digest

This commit is contained in:
simon lehericey 2024-04-18 11:19:51 +02:00
parent 8f8b63ac6a
commit a10a59b265
No known key found for this signature in database
GPG key ID: CDE670D827C7B3C5

View file

@ -7,6 +7,7 @@ class Cron::OperationsSignatureJob < Cron::CronJob
while start_date < last_midnight
operations = DossierOperationLog
.select(:id, :digest)
.where(executed_at: start_date...start_date.tomorrow, bill_signature: nil)
BillSignatureService.sign_operations(operations, start_date) if operations.present?