From 711627d13eb84c5f6a52db823066a2e6ebe31cfd Mon Sep 17 00:00:00 2001 From: dekzter Date: Thu, 20 Mar 2025 17:29:25 -0400 Subject: [PATCH] fixed last_seen, updated batch size --- apps/m3u/tasks.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/m3u/tasks.py b/apps/m3u/tasks.py index 5d3e1455..130c7927 100644 --- a/apps/m3u/tasks.py +++ b/apps/m3u/tasks.py @@ -234,6 +234,7 @@ def process_m3u_batch(account_id, batch, group_names, hash_keys): else: existing_streams[stream_hash] = obj else: + stream_props["last_seen"] = timezone.now() streams_to_create.append(Stream(**stream_props)) try: @@ -245,8 +246,6 @@ def process_m3u_batch(account_id, batch, group_names, hash_keys): Stream.objects.bulk_update(existing_streams.values(), ["last_seen"]) except Exception as e: logger.error(f"Bulk create failed: {str(e)}") - check_field_lengths(streams_to_create) - # check_field_lengths(streams_to_update) return f"Batch processed: {len(streams_to_create)} created, {len(streams_to_update)} updated."