summaryrefslogtreecommitdiff
path: root/kombu/async/timer.py
diff options
context:
space:
mode:
authorAsk Solem <ask@celeryproject.org>2017-02-16 10:44:48 -0800
committerAsk Solem <ask@celeryproject.org>2017-02-16 10:44:48 -0800
commite6fab2f68b562cf1400bd8167e9b755f0482aafe (patch)
treeb4d6be32dc8c62fa032e3c1a1a74636ac8360a38 /kombu/async/timer.py
parentf2f7c67651106e77fb2db60ded134404ccc0a626 (diff)
downloadkombu-5.0-devel.tar.gz
Diffstat (limited to 'kombu/async/timer.py')
-rw-r--r--kombu/async/timer.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/kombu/async/timer.py b/kombu/async/timer.py
index 69d93a36..b67f4ddf 100644
--- a/kombu/async/timer.py
+++ b/kombu/async/timer.py
@@ -3,10 +3,10 @@
import heapq
import sys
-from collections import namedtuple
from datetime import datetime
from functools import total_ordering
from time import monotonic
+from typing import NamedTuple
from weakref import proxy as weakrefproxy
from vine.utils import wraps
@@ -27,7 +27,13 @@ DEFAULT_MAX_INTERVAL = 2
EPOCH = datetime.utcfromtimestamp(0).replace(tzinfo=utc)
IS_PYPY = hasattr(sys, 'pypy_version_info')
-scheduled = namedtuple('scheduled', ('eta', 'priority', 'entry'))
+
+class scheduled(NamedTuple):
+ """Information about scheduled item."""
+
+ eta: float
+ priority: int
+ entry: 'Entry'
def to_timestamp(d, default_timezone=utc, time=monotonic):