Fetcher - CPU usage - Skip processing if the previous checksum and the just fetched one was the same (#925)

This commit is contained in:
dgtlmoon
2022-12-14 15:08:34 +01:00
committed by GitHub
parent 93cc30437f
commit b76148a0f4
8 changed files with 102 additions and 80 deletions

View File

@@ -0,0 +1,10 @@
from dataclasses import dataclass, field
from typing import Any
# So that we can queue some metadata in `item`
# https://docs.python.org/3/library/queue.html#queue.PriorityQueue
#
@dataclass(order=True)
class PrioritizedItem:
priority: int
item: Any=field(compare=False)