diff options
author | Ask Solem <ask@celeryproject.org> | 2017-02-16 10:44:48 -0800 |
---|---|---|
committer | Ask Solem <ask@celeryproject.org> | 2017-02-16 10:44:48 -0800 |
commit | e6fab2f68b562cf1400bd8167e9b755f0482aafe (patch) | |
tree | b4d6be32dc8c62fa032e3c1a1a74636ac8360a38 /kombu/async/timer.py | |
parent | f2f7c67651106e77fb2db60ded134404ccc0a626 (diff) | |
download | kombu-5.0-devel.tar.gz |
WIP5.0-devel
Diffstat (limited to 'kombu/async/timer.py')
-rw-r--r-- | kombu/async/timer.py | 10 |
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): |