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 7f4fae2 commit 77652feCopy full SHA for 77652fe
taskqueue/file_queue_api.py
@@ -1,4 +1,9 @@
1
-import fcntl
+try:
2
+ import fcntl
3
+ FILEQUEUE_SUPPORTED = True
4
+except ImportError:
5
+ FILEQUEUE_SUPPORTED = False
6
+
7
import functools
8
import itertools
9
import json
@@ -164,6 +169,12 @@ class FileQueueAPI(object):
164
169
time is very long.
165
170
"""
166
171
def __init__(self, path):
172
+ if not FILEQUEUE_SUPPORTED:
173
+ raise NotImplementedError(
174
+ "FileQueueAPI is only supported on unix based systems due to a "
175
+ "dependency on fcntl interprocess locking."
176
+ )
177
167
178
path = toabs(path)
168
179
self.path = path
180
0 commit comments