cobweb-launcher 0.1.4__py3-none-any.whl → 0.1.6__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.
@@ -1,7 +1,7 @@
1
1
  import time
2
2
  from hashlib import md5
3
3
  from cobweb import log, Queue, Seed
4
- from utils import issubclass_cobweb_interface
4
+ from cobweb.utils import issubclass_cobweb_inf
5
5
 
6
6
  # from pympler import asizeof
7
7
 
@@ -11,7 +11,7 @@ class Scheduler:
11
11
  def schedule_seed(self, ready_seed_length, get_scheduler_lock, add_seed):
12
12
 
13
13
  inf_name = "SchedulerInterface"
14
- if not issubclass_cobweb_interface(self.__class__, inf_name):
14
+ if not issubclass_cobweb_inf(self.__class__, inf_name):
15
15
  raise Exception("not have schedule function!")
16
16
 
17
17
  if self.__class__.__name__ == "Default":
@@ -107,7 +107,7 @@ class Storer:
107
107
  def store_task(self, stop, last, reset_seed, set_storer):
108
108
 
109
109
  inf_name = "StorerInterface"
110
- if not issubclass_cobweb_interface(self.__class__, inf_name):
110
+ if not issubclass_cobweb_inf(self.__class__, inf_name):
111
111
  return None
112
112
 
113
113
  if not getattr(self, "store", None):
cobweb/single/launcher.py CHANGED
@@ -212,7 +212,7 @@ def launcher(task):
212
212
  args=(
213
213
  stop, last,
214
214
  redis_db.reset_seed,
215
- redis_db.set_storer
215
+ redis_db.del_seed
216
216
  )
217
217
  ).start()
218
218
 
cobweb/single/models.py CHANGED
@@ -1,7 +1,6 @@
1
1
  import time
2
2
  from cobweb import log, Queue, Seed
3
- from utils import issubclass_cobweb_interface
4
-
3
+ from cobweb.utils import issubclass_cobweb_inf
5
4
  # from pympler import asizeof
6
5
 
7
6
 
@@ -10,7 +9,7 @@ class Scheduler:
10
9
  def schedule_seed(self, ready_seed_length, get_scheduler_lock, add_seed):
11
10
 
12
11
  inf_name = "SchedulerInterface"
13
- if not issubclass_cobweb_interface(self.__class__, inf_name):
12
+ if not issubclass_cobweb_inf(self.__class__, inf_name):
14
13
  raise Exception("not have schedule function!")
15
14
 
16
15
  if self.__class__.__name__ == "Default":
@@ -102,7 +101,7 @@ class Storer:
102
101
  def store_task(self, stop, last, reset_seed, del_seed):
103
102
 
104
103
  inf_name = "StorerInterface"
105
- if not issubclass_cobweb_interface(self.__class__, inf_name):
104
+ if not issubclass_cobweb_inf(self.__class__, inf_name):
106
105
  return None
107
106
 
108
107
  if not getattr(self, "store", None):
cobweb/utils.py CHANGED
@@ -51,7 +51,7 @@ def struct_start_seeds(seeds):
51
51
  return Seed(seeds)
52
52
 
53
53
 
54
- def issubclass_cobweb_interface(_class, inf_name):
54
+ def issubclass_cobweb_inf(_class, inf_name):
55
55
  for _c in _class.__mro__[1:]:
56
56
  if _c.__name__ == inf_name:
57
57
  return True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cobweb-launcher
3
- Version: 0.1.4
3
+ Version: 0.1.6
4
4
  Summary: spider_hole
5
5
  Home-page: https://github.com/Juannie-PP/cobweb
6
6
  Author: Juannie-PP
@@ -5,7 +5,7 @@ cobweb/interface.py,sha256=um_k2AAQl1HTOvfUlq914DjkpfZVwt2m1B65EpPKrmE,802
5
5
  cobweb/log.py,sha256=Gb3_y4IzTo5pJohTggBCU9rK6-ZN3hgTOHkoXHyN6CU,2384
6
6
  cobweb/setting.py,sha256=UAu_dLuIFYO98MxtlZ5sZqJcwKAUKq4Bu4KoKlV50Mc,288
7
7
  cobweb/task.py,sha256=77F5EaopSVlSX2TANv1lhuPHFI8ER8Jh4tSGrwDWAc0,1405
8
- cobweb/utils.py,sha256=5ZcSfT3VCWF_Kl1APGYJYHtPhZPnr45nFqyyZA9LlOg,2663
8
+ cobweb/utils.py,sha256=xIUXKNJA63czhPVOKFQeWkC1DSJr_hK0z9szj-DdRkA,2657
9
9
  cobweb/db/__init__.py,sha256=4m9lqmxZCRbaih3Z3rl_BT0GugMd0dkOIgu_P9aeC84,63
10
10
  cobweb/db/oss_db.py,sha256=lFGNuH3tdIMsohVXQ_fTZPyBfS2oxYNmFNuQ-ZBQgm0,4221
11
11
  cobweb/db/redis_db.py,sha256=yoWy-GI0rjVmT-68Che-pypfqNwNti5JGkc9bYvJH2o,8202
@@ -19,13 +19,13 @@ cobweb/db/storer/redis.py,sha256=7Q2XEQwBL6X_M1uvxzzuSBt6iw9piKw-_FWKm2INZDQ,412
19
19
  cobweb/db/storer/textfile.py,sha256=3mDHMvF6Sh5fn3IHzWQxyTUd45V-zUoH8vY3EoRlMx0,415
20
20
  cobweb/distributed/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  cobweb/distributed/launcher.py,sha256=jTtBXBmna_6yFdj6gyGQiiEtg8I0g5uI5h8kbHWt454,7998
22
- cobweb/distributed/models.py,sha256=Z46-Dwv--VLUr9t7wbNHaLIuEK0l-copJEbc-abfjb8,4617
22
+ cobweb/distributed/models.py,sha256=cfcr2kfkjVbugkQjqS8bYJ1Ne0o0MHfQsWVMj32bPDw,4606
23
23
  cobweb/single/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
- cobweb/single/launcher.py,sha256=Z-PaX1f_nphdBwbIW1Ki6D_4xsrFmx94SO3BXaexYAg,7304
25
- cobweb/single/models.py,sha256=xIn0mefT_oMVynn3V6S4wkOCx6PGOemT4_fcuU7CSZs,4297
24
+ cobweb/single/launcher.py,sha256=IoJbn87j7t7Pib_FxoWZmmX8asXOqNGb-9ospw6EYJI,7302
25
+ cobweb/single/models.py,sha256=URCrlTEAkbOp0xCYT_Uc0BBEDwzjV_gyujRkBHnJ96A,4285
26
26
  cobweb/single/nest.py,sha256=mL8q9a5BjtoeUyzXCIVw_vyUsNY8ltbvQpYIIpZEDFU,5012
27
- cobweb_launcher-0.1.4.dist-info/LICENSE,sha256=z1rxSIGOyzcSb3orZxFPxzx-0C1vTocmswqBNxpKfEk,1063
28
- cobweb_launcher-0.1.4.dist-info/METADATA,sha256=8RC2POKMvZP6LeVw2vWbS_ZITbM4stH21N5Q_0gMe1w,1225
29
- cobweb_launcher-0.1.4.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
30
- cobweb_launcher-0.1.4.dist-info/top_level.txt,sha256=4GETBGNsKqiCUezmT-mJn7tjhcDlu7nLIV5gGgHBW4I,7
31
- cobweb_launcher-0.1.4.dist-info/RECORD,,
27
+ cobweb_launcher-0.1.6.dist-info/LICENSE,sha256=z1rxSIGOyzcSb3orZxFPxzx-0C1vTocmswqBNxpKfEk,1063
28
+ cobweb_launcher-0.1.6.dist-info/METADATA,sha256=fJh_1q8OJNO3qGFgvixSumccwJWs7xdL7y5EHVPF_V8,1225
29
+ cobweb_launcher-0.1.6.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
30
+ cobweb_launcher-0.1.6.dist-info/top_level.txt,sha256=4GETBGNsKqiCUezmT-mJn7tjhcDlu7nLIV5gGgHBW4I,7
31
+ cobweb_launcher-0.1.6.dist-info/RECORD,,