We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7804c87 commit 0953bc8Copy full SHA for 0953bc8
overpass/api.py
@@ -4,6 +4,7 @@
4
# See LICENSE.txt for the full license text.
5
6
import csv
7
+from typing import Union
8
import json
9
import logging
10
import re
@@ -200,6 +201,15 @@ def slots_running(self) -> tuple:
200
201
"""
202
return self._api_status()["running_slots"]
203
204
+ @property
205
+ def next_slot_available(self) -> Union(None, datetime):
206
+ """
207
+ :returns: None if a slot is available now, or a datetime for when the next slot is free
208
209
+ if self.slots_available:
210
+ return None
211
+ return min(self.slots_running + self.slots_waiting)
212
+
213
def search(self, feature_type, regex=False):
214
"""Search for something."""
215
raise NotImplementedError()
0 commit comments