cobweb-launcher 1.2.3__py3-none-any.whl → 1.2.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cobweb-launcher might be problematic. Click here for more details.
- cobweb/launchers/launcher.py +1 -0
- cobweb/launchers/launcher_pro.py +9 -9
- {cobweb_launcher-1.2.3.dist-info → cobweb_launcher-1.2.5.dist-info}/METADATA +1 -1
- {cobweb_launcher-1.2.3.dist-info → cobweb_launcher-1.2.5.dist-info}/RECORD +7 -7
- {cobweb_launcher-1.2.3.dist-info → cobweb_launcher-1.2.5.dist-info}/LICENSE +0 -0
- {cobweb_launcher-1.2.3.dist-info → cobweb_launcher-1.2.5.dist-info}/WHEEL +0 -0
- {cobweb_launcher-1.2.3.dist-info → cobweb_launcher-1.2.5.dist-info}/top_level.txt +0 -0
cobweb/launchers/launcher.py
CHANGED
cobweb/launchers/launcher_pro.py
CHANGED
|
@@ -16,8 +16,8 @@ class LauncherPro(Launcher):
|
|
|
16
16
|
self._fail_key = "{%s:%s}:fail" % (project, task)
|
|
17
17
|
self._heartbeat_key = "heartbeat:%s_%s" % (project, task)
|
|
18
18
|
self._reset_lock_key = "lock:reset:%s_%s" % (project, task)
|
|
19
|
-
self._statistics_done_key = "
|
|
20
|
-
self._statistics_fail_key = "
|
|
19
|
+
self._statistics_done_key = "statistics:%s:%s:done" % (project, task)
|
|
20
|
+
self._statistics_fail_key = "statistics:%s:%s:fail" % (project, task)
|
|
21
21
|
self._db = RedisDB()
|
|
22
22
|
|
|
23
23
|
self._heartbeat_start_event = threading.Event()
|
|
@@ -27,11 +27,11 @@ class LauncherPro(Launcher):
|
|
|
27
27
|
def heartbeat(self):
|
|
28
28
|
return self._db.exists(self._heartbeat_key)
|
|
29
29
|
|
|
30
|
-
def statistics(self, key, count
|
|
31
|
-
if self._db.exists(key):
|
|
32
|
-
self._db.
|
|
30
|
+
def statistics(self, key, count):
|
|
31
|
+
if not self._task_model and not self._db.exists(key):
|
|
32
|
+
self._db.setex(key, 86400 * 30, int(count))
|
|
33
33
|
else:
|
|
34
|
-
self._db.
|
|
34
|
+
self._db._client.incrby(key, count)
|
|
35
35
|
|
|
36
36
|
def _execute_heartbeat(self):
|
|
37
37
|
while not self._stop.is_set():
|
|
@@ -133,15 +133,15 @@ class LauncherPro(Launcher):
|
|
|
133
133
|
seeds.append(seed.to_string)
|
|
134
134
|
if seeds:
|
|
135
135
|
count = self._db.zrem(self._todo_key, *seeds)
|
|
136
|
-
self.statistics(self._statistics_done_key, count
|
|
136
|
+
self.statistics(self._statistics_done_key, count)
|
|
137
137
|
self._remove_doing_seeds(seeds)
|
|
138
138
|
if s_seeds:
|
|
139
139
|
count = self._db.done([self._todo_key, self._done_key], *s_seeds)
|
|
140
|
-
self.statistics(self._statistics_done_key, count
|
|
140
|
+
self.statistics(self._statistics_done_key, count)
|
|
141
141
|
self._remove_doing_seeds(s_seeds)
|
|
142
142
|
if f_seeds:
|
|
143
143
|
count = self._db.done([self._todo_key, self._fail_key], *f_seeds)
|
|
144
|
-
self.statistics(self._statistics_fail_key, count
|
|
144
|
+
self.statistics(self._statistics_fail_key, count)
|
|
145
145
|
self._remove_doing_seeds(f_seeds)
|
|
146
146
|
|
|
147
147
|
if status:
|
|
@@ -18,9 +18,9 @@ cobweb/db/redis_db.py,sha256=NNI2QkRV1hEZI-z-COEncXt88z3pZN6wusKlcQzc8V4,4304
|
|
|
18
18
|
cobweb/exceptions/__init__.py,sha256=E9SHnJBbhD7fOgPFMswqyOf8SKRDrI_i25L0bSpohvk,32
|
|
19
19
|
cobweb/exceptions/oss_db_exception.py,sha256=iP_AImjNHT3-Iv49zCFQ3rdLnlvuHa3h2BXApgrOYpA,636
|
|
20
20
|
cobweb/launchers/__init__.py,sha256=af0Y6wrGX8SQZ7w7XL2sOtREjCT3dwad-uCc3nIontY,76
|
|
21
|
-
cobweb/launchers/launcher.py,sha256=
|
|
21
|
+
cobweb/launchers/launcher.py,sha256=Mepg-hv9YL5_VnY_Mwqxzd8ZRGyK8gxsl_5B_Ibz0Uc,5466
|
|
22
22
|
cobweb/launchers/launcher_air.py,sha256=zHVEJqQCxYU1WDnqQzzEHbEXasR1GmKevujQkCfFt5o,2947
|
|
23
|
-
cobweb/launchers/launcher_pro.py,sha256=
|
|
23
|
+
cobweb/launchers/launcher_pro.py,sha256=g0aqlUSmgU4o7F9bQ_oYrdlqn8w71wcIS93t1NvzxBg,8324
|
|
24
24
|
cobweb/pipelines/__init__.py,sha256=zSUsGtx6smbs2iXBXvYynReKSgky-3gjqaAtKVnA_OU,105
|
|
25
25
|
cobweb/pipelines/base_pipeline.py,sha256=fYnWf79GmhufXpcnMa3te18SbmnVeYLwxfyo-zLd9CY,1577
|
|
26
26
|
cobweb/pipelines/loghub_pipeline.py,sha256=cjPO6w6UJ0jNw2fVvdX0BCdlm58T7dmYXlxzXOBpvfY,1027
|
|
@@ -30,8 +30,8 @@ cobweb/pipelines/pipeline_loghub.py,sha256=xZ6D55BGdiM71WUv83jyLGbEyUwhBHLJRZoXt
|
|
|
30
30
|
cobweb/utils/__init__.py,sha256=JTE4sBfHnKHhD6w9Auk0MIT7O9BMOamCeryhlHNx3Zg,47
|
|
31
31
|
cobweb/utils/oss.py,sha256=gyt8-UB07tVphZLQXMOf-JTJwU-mWq8KZkOXKkAf3uk,3513
|
|
32
32
|
cobweb/utils/tools.py,sha256=5JEaaAwYoV9Sdla2UBIJn6faUBuXmxUMagm9ck6FVqs,1253
|
|
33
|
-
cobweb_launcher-1.2.
|
|
34
|
-
cobweb_launcher-1.2.
|
|
35
|
-
cobweb_launcher-1.2.
|
|
36
|
-
cobweb_launcher-1.2.
|
|
37
|
-
cobweb_launcher-1.2.
|
|
33
|
+
cobweb_launcher-1.2.5.dist-info/LICENSE,sha256=z1rxSIGOyzcSb3orZxFPxzx-0C1vTocmswqBNxpKfEk,1063
|
|
34
|
+
cobweb_launcher-1.2.5.dist-info/METADATA,sha256=-1P8DAthZeUuTBjWMQDUG0GmVIctOEGM4dc3Kh175-8,6489
|
|
35
|
+
cobweb_launcher-1.2.5.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
|
|
36
|
+
cobweb_launcher-1.2.5.dist-info/top_level.txt,sha256=4GETBGNsKqiCUezmT-mJn7tjhcDlu7nLIV5gGgHBW4I,7
|
|
37
|
+
cobweb_launcher-1.2.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|