code: def clean_old_entries():
      
      from indico_livesync.plugin import LiveSyncPlugin
      from indico_livesync.models.queue import LiveSyncQueueEntry
  
      queue_entry_ttl = LiveSyncPlugin.settings.get('queue_entry_ttl')
      if not queue_entry_ttl:
          return
      expire_threshold = now_utc() - timedelta(days=queue_entry_ttl)
      LiveSyncQueueEntry.find(LiveSyncQueueEntry.processed,
                              LiveSyncQueueEntry.timestamp < expire_threshold).delete(synchronize_session='fetch')
docs: Deletes obsolete entries from the queues