cobweb-launcher 0.1.16__py3-none-any.whl → 0.1.17__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/__init__.py +1 -0
- cobweb/constant.py +3 -1
- cobweb/single/models.py +4 -4
- cobweb/task.py +3 -0
- {cobweb_launcher-0.1.16.dist-info → cobweb_launcher-0.1.17.dist-info}/METADATA +1 -1
- {cobweb_launcher-0.1.16.dist-info → cobweb_launcher-0.1.17.dist-info}/RECORD +9 -9
- {cobweb_launcher-0.1.16.dist-info → cobweb_launcher-0.1.17.dist-info}/LICENSE +0 -0
- {cobweb_launcher-0.1.16.dist-info → cobweb_launcher-0.1.17.dist-info}/WHEEL +0 -0
- {cobweb_launcher-0.1.16.dist-info → cobweb_launcher-0.1.17.dist-info}/top_level.txt +0 -0
cobweb/__init__.py
CHANGED
cobweb/constant.py
CHANGED
cobweb/single/models.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import time
|
|
2
|
-
from cobweb import log, Queue, Seed
|
|
2
|
+
from cobweb import log, Queue, Seed, Setting
|
|
3
3
|
from cobweb.utils import issubclass_cobweb_inf
|
|
4
4
|
# from pympler import asizeof
|
|
5
5
|
|
|
@@ -32,11 +32,11 @@ class Scheduler:
|
|
|
32
32
|
while not stop.is_set():
|
|
33
33
|
|
|
34
34
|
if not ready_seed_length():
|
|
35
|
-
time.sleep(
|
|
35
|
+
time.sleep(Setting.SCHEDULER_WAIT_TIME)
|
|
36
36
|
continue
|
|
37
37
|
|
|
38
38
|
if self.queue.length >= self.length:
|
|
39
|
-
time.sleep(
|
|
39
|
+
time.sleep(Setting.SCHEDULER_BLOCK_TIME)
|
|
40
40
|
continue
|
|
41
41
|
|
|
42
42
|
seeds = get_seed(self.length)
|
|
@@ -55,7 +55,7 @@ class Spider:
|
|
|
55
55
|
while not stop.is_set():
|
|
56
56
|
seed = self.queue.pop()
|
|
57
57
|
if not seed:
|
|
58
|
-
time.sleep(
|
|
58
|
+
time.sleep(Setting.SPIDER_WAIT_TIME)
|
|
59
59
|
continue
|
|
60
60
|
elif seed._retry >= self.max_retries:
|
|
61
61
|
del_seed(seed, spider_status=False)
|
cobweb/task.py
CHANGED
|
@@ -9,6 +9,9 @@ def init_task_env():
|
|
|
9
9
|
Setting.SPIDER_RUN_TIME = float(os.getenv("SPIDER_RUN_TIME", 0.2))
|
|
10
10
|
Setting.DEAL_MODEL = os.getenv("DEAL_MODEL", DealModel.failure)
|
|
11
11
|
Setting.LAUNCHER_MODEL = os.getenv("LAUNCHER_MODEL", LauncherModel.task)
|
|
12
|
+
Setting.SCHEDULER_WAIT_TIME = float(os.getenv("SCHEDULER_WAIT_TIME", 5))
|
|
13
|
+
Setting.SCHEDULER_BLOCK_TIME = float(os.getenv("SCHEDULER_BLOCK_TIME", 3))
|
|
14
|
+
Setting.SPIDER_RUN_TIME = float(os.getenv("SPIDER_RUN_TIME", 3))
|
|
12
15
|
|
|
13
16
|
|
|
14
17
|
class Task:
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
cobweb/__init__.py,sha256=
|
|
1
|
+
cobweb/__init__.py,sha256=zVims_awYxKNqULuKSjFXdZAaDJaqzFBJJo_SqeakMs,286
|
|
2
2
|
cobweb/bbb.py,sha256=zKeCeBVFQfhEv6M8CCktUTM7tXDZmAu6ZN0-ET44pUY,5707
|
|
3
|
-
cobweb/constant.py,sha256=
|
|
3
|
+
cobweb/constant.py,sha256=ytkGczukfFU9bx4ricEQy7eY3Odwc4Xmrps9PwuGiuo,553
|
|
4
4
|
cobweb/decorators.py,sha256=eYQI9rddPVJihAlomLTmbtQhIOzPw8dCrOFpxAq2pLY,318
|
|
5
5
|
cobweb/interface.py,sha256=um_k2AAQl1HTOvfUlq914DjkpfZVwt2m1B65EpPKrmE,802
|
|
6
6
|
cobweb/log.py,sha256=Gb3_y4IzTo5pJohTggBCU9rK6-ZN3hgTOHkoXHyN6CU,2384
|
|
7
7
|
cobweb/setting.py,sha256=UAu_dLuIFYO98MxtlZ5sZqJcwKAUKq4Bu4KoKlV50Mc,288
|
|
8
|
-
cobweb/task.py,sha256=
|
|
8
|
+
cobweb/task.py,sha256=wqJKyMYg_ftCB29mTTlEue5e2zq-5tkC4mFFqraJwvA,2000
|
|
9
9
|
cobweb/utils.py,sha256=ivmRqJJNtwdOKYT4G7qQCWnL8ar9c-shxeDZzGB2E9c,2651
|
|
10
10
|
cobweb/db/__init__.py,sha256=jC-uOThYLtiDUG6cTJRkDITgOzR4nIOeaZQeZhuk-v0,139
|
|
11
11
|
cobweb/db/oss_db.py,sha256=59HwMMfoGUr6l_BI4p84YHYoQwEn22cCM_1GZK34Uo4,4244
|
|
@@ -33,10 +33,10 @@ cobweb/equip/single/launcher.py,sha256=KRsw7yxklvFM85cel-EyLsNPLyrC9Hd26BMSx6-4H
|
|
|
33
33
|
cobweb/equip/single/models.py,sha256=pWALuEat5v9cNAvJ_PaAlDcIHUWuu38EQl0KFcpSJXA,5344
|
|
34
34
|
cobweb/single/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
35
|
cobweb/single/launcher.py,sha256=IoJbn87j7t7Pib_FxoWZmmX8asXOqNGb-9ospw6EYJI,7302
|
|
36
|
-
cobweb/single/models.py,sha256=
|
|
36
|
+
cobweb/single/models.py,sha256=wIEV35666lxdzqjDqBHPjjh-r6zD0x24rtQYz7d4Oxw,4332
|
|
37
37
|
cobweb/single/nest.py,sha256=49K6KQ934INfPrWQsrq9rIFpQauLbLGOFbDaHvoQzOk,5015
|
|
38
|
-
cobweb_launcher-0.1.
|
|
39
|
-
cobweb_launcher-0.1.
|
|
40
|
-
cobweb_launcher-0.1.
|
|
41
|
-
cobweb_launcher-0.1.
|
|
42
|
-
cobweb_launcher-0.1.
|
|
38
|
+
cobweb_launcher-0.1.17.dist-info/LICENSE,sha256=z1rxSIGOyzcSb3orZxFPxzx-0C1vTocmswqBNxpKfEk,1063
|
|
39
|
+
cobweb_launcher-0.1.17.dist-info/METADATA,sha256=Q5ZOsZqe_ETrAg5opFlThYQHk3kZUcYqPEB4BZeD9JY,1220
|
|
40
|
+
cobweb_launcher-0.1.17.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
41
|
+
cobweb_launcher-0.1.17.dist-info/top_level.txt,sha256=4GETBGNsKqiCUezmT-mJn7tjhcDlu7nLIV5gGgHBW4I,7
|
|
42
|
+
cobweb_launcher-0.1.17.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|