warp-beacon 2.2.64__py3-none-any.whl → 2.2.66__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.
- warp_beacon/__version__.py +1 -1
- warp_beacon/scraper/__init__.py +5 -5
- warp_beacon/scraper/fail_handler.py +2 -1
- warp_beacon/telegram/bot.py +1 -2
- {warp_beacon-2.2.64.dist-info → warp_beacon-2.2.66.dist-info}/METADATA +1 -1
- {warp_beacon-2.2.64.dist-info → warp_beacon-2.2.66.dist-info}/RECORD +10 -10
- {warp_beacon-2.2.64.dist-info → warp_beacon-2.2.66.dist-info}/LICENSE +0 -0
- {warp_beacon-2.2.64.dist-info → warp_beacon-2.2.66.dist-info}/WHEEL +0 -0
- {warp_beacon-2.2.64.dist-info → warp_beacon-2.2.66.dist-info}/entry_points.txt +0 -0
- {warp_beacon-2.2.64.dist-info → warp_beacon-2.2.66.dist-info}/top_level.txt +0 -0
warp_beacon/__version__.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
__version__ = "2.2.
|
1
|
+
__version__ = "2.2.66"
|
2
2
|
|
warp_beacon/scraper/__init__.py
CHANGED
@@ -34,10 +34,8 @@ class AsyncDownloader(object):
|
|
34
34
|
manager = None
|
35
35
|
acc_selector = None
|
36
36
|
scheduler = None
|
37
|
-
fail_handler = None
|
38
37
|
|
39
|
-
def __init__(self, uploader: AsyncUploader,
|
40
|
-
self.fail_handler = FailHandler(db_connect)
|
38
|
+
def __init__(self, uploader: AsyncUploader, workers_count: int) -> None:
|
41
39
|
self.manager = multiprocessing.Manager()
|
42
40
|
self.allow_loop = self.manager.Value('i', 1)
|
43
41
|
self.acc_selector = AccountSelector(self.manager, ACC_FILE)
|
@@ -87,6 +85,8 @@ class AsyncDownloader(object):
|
|
87
85
|
|
88
86
|
def do_work(self, selector: AccountSelector) -> None:
|
89
87
|
logging.info("download worker started")
|
88
|
+
# pymongo is not fork-safe so new connect to DB required
|
89
|
+
fail_handler = FailHandler(DBClient())
|
90
90
|
while self.allow_loop.value == 1:
|
91
91
|
try:
|
92
92
|
job = None
|
@@ -234,7 +234,7 @@ class AsyncDownloader(object):
|
|
234
234
|
#self.try_next_account(selector, job, report_error="captcha")
|
235
235
|
#e.job.job_postponed_until = time.time() + 300
|
236
236
|
#self.job_queue.put(e.job)
|
237
|
-
|
237
|
+
fail_handler.store_failed_job(e.job)
|
238
238
|
break
|
239
239
|
except (UnknownError, Exception) as e:
|
240
240
|
logging.warning("UnknownError occurred!")
|
@@ -271,7 +271,7 @@ class AsyncDownloader(object):
|
|
271
271
|
|
272
272
|
if items:
|
273
273
|
# success
|
274
|
-
for job in
|
274
|
+
for job in fail_handler.get_failed_jobs():
|
275
275
|
self.queue_task(job)
|
276
276
|
for item in items:
|
277
277
|
media_info = {"filesize": 0}
|
@@ -11,7 +11,8 @@ class FailHandler(object):
|
|
11
11
|
client = None
|
12
12
|
db = None
|
13
13
|
def __init__(self, client: DBClient) -> None:
|
14
|
-
self.
|
14
|
+
self.client = client
|
15
|
+
self.db = self.client.client.media.failed_jobs
|
15
16
|
|
16
17
|
def __del__(self) -> None:
|
17
18
|
self.client.close()
|
warp_beacon/telegram/bot.py
CHANGED
@@ -75,8 +75,7 @@ class Bot(object):
|
|
75
75
|
)
|
76
76
|
self.downloader = warp_beacon.scraper.AsyncDownloader(
|
77
77
|
workers_count=int(os.environ.get("WORKERS_POOL_SIZE", default=workers_amount)),
|
78
|
-
uploader=self.uploader
|
79
|
-
db_connect=db_connect
|
78
|
+
uploader=self.uploader
|
80
79
|
)
|
81
80
|
|
82
81
|
self.scheduler = IGScheduler(self.downloader)
|
@@ -3,7 +3,7 @@ lib/systemd/system/warp_beacon.service,sha256=lPmHqLqcI2eIV7nwHS0qcALQrznixqJuww
|
|
3
3
|
var/warp_beacon/accounts.json,sha256=2QQMS9N_Z-TnfZq4U1vSUe4IKyZGmTFdgo8BoF4hQ7E,1710
|
4
4
|
var/warp_beacon/placeholder.gif,sha256=cE5CGJVaop4Sx21zx6j4AyoHU0ncmvQuS2o6hJfEH88,6064
|
5
5
|
warp_beacon/__init__.py,sha256=_rThNODmz0nDp_n4mWo_HKaNFE5jk1_7cRhHyYaencI,163
|
6
|
-
warp_beacon/__version__.py,sha256=
|
6
|
+
warp_beacon/__version__.py,sha256=08aUGAbJjJO8pbtMZL4d7u33223vYKIZiZTt0mxHI6U,24
|
7
7
|
warp_beacon/warp_beacon.py,sha256=7KEtZDj-pdhtl6m-zFLsSojs1ZR4o7L0xbqtdmYPvfE,342
|
8
8
|
warp_beacon/compress/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
9
9
|
warp_beacon/compress/video.py,sha256=_PDMVYCyzLYxHv1uZmmzGcG_8rjaZr7BTXsXTTy_oS4,2846
|
@@ -19,11 +19,11 @@ warp_beacon/mediainfo/silencer.py,sha256=MgUc9Ibbhjhg9GbJMNfJqrdDkMsQShZkQ1sCwvW
|
|
19
19
|
warp_beacon/mediainfo/video.py,sha256=UBZrhTN5IDI-aYu6tsJEILo9nFkjHhkldGVFmvV7tEI,2480
|
20
20
|
warp_beacon/scheduler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
21
21
|
warp_beacon/scheduler/scheduler.py,sha256=F9jF6myIHOI0TmC0-rBt2Un8gVvuhBW9zL-nEAEj0Bc,2585
|
22
|
-
warp_beacon/scraper/__init__.py,sha256=
|
22
|
+
warp_beacon/scraper/__init__.py,sha256=i3yda30elPbnG_JuD1DSXZLdDc2C30UqqbUbEzXlhnY,16538
|
23
23
|
warp_beacon/scraper/abstract.py,sha256=aNZ9ypF9B8BjflcIwi-7wEzIqF-XPeF0xvfX9CP_iIw,2708
|
24
24
|
warp_beacon/scraper/account_selector.py,sha256=YUzLxfGGBvdTR9sJVcx9SDkYK4tWo3iRkGiPIg6IRn4,3649
|
25
25
|
warp_beacon/scraper/exceptions.py,sha256=fHywTm2-y2RkgM6hVz12CkDMBgHcEoN2a1TBLaVM2t4,1300
|
26
|
-
warp_beacon/scraper/fail_handler.py,sha256=
|
26
|
+
warp_beacon/scraper/fail_handler.py,sha256=_blvckfTZ4xWVancQKVRXH5ClKGwfrBxMwvXIFZh1qA,975
|
27
27
|
warp_beacon/scraper/instagram/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
28
28
|
warp_beacon/scraper/instagram/instagram.py,sha256=m2bAqLu-_HchlF5CVZDlytB9cFGxrN7EEbQW-G1f5u4,12857
|
29
29
|
warp_beacon/scraper/youtube/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -34,14 +34,14 @@ warp_beacon/scraper/youtube/youtube.py,sha256=JvN5pVz0jtxCY9FGMl1dIg5Ccr2Kulaoxt
|
|
34
34
|
warp_beacon/storage/__init__.py,sha256=2uvyIR0APIW6gOxwJRvCji7wS2q6I7dghvLyWsRqRxo,3312
|
35
35
|
warp_beacon/storage/mongo.py,sha256=2ReAOskgeAlWsMYukH1_-PCjy8yN8eaasgBZ2FqQfu4,528
|
36
36
|
warp_beacon/telegram/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
37
|
-
warp_beacon/telegram/bot.py,sha256=
|
37
|
+
warp_beacon/telegram/bot.py,sha256=tA9g6UT0JeV4P6XSrfDXvnTvNen3c75GtDuvbufAs54,15552
|
38
38
|
warp_beacon/telegram/handlers.py,sha256=171BUNjcaqTM1QnJ9KTBzuJOX1tiDys0hnyuAkA1NiI,7262
|
39
39
|
warp_beacon/telegram/placeholder_message.py,sha256=N1fSL1xbFLF5alhnEvk-xbf3v2A_nLWg6xHtVZTaoiA,6396
|
40
40
|
warp_beacon/telegram/utils.py,sha256=9rNC1BqMZm-kKbzVonBOV8MYfMbcO68Bavq-K3Yj2KA,3115
|
41
41
|
warp_beacon/uploader/__init__.py,sha256=rbfsm_eYcfsBRkiaG0glVgBNtQCEe7cVQTWEIAHz5aw,4763
|
42
|
-
warp_beacon-2.2.
|
43
|
-
warp_beacon-2.2.
|
44
|
-
warp_beacon-2.2.
|
45
|
-
warp_beacon-2.2.
|
46
|
-
warp_beacon-2.2.
|
47
|
-
warp_beacon-2.2.
|
42
|
+
warp_beacon-2.2.66.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
43
|
+
warp_beacon-2.2.66.dist-info/METADATA,sha256=YCICXeokguKMpZepICiXmOry6RQzr81ZbT47kC5siBo,21303
|
44
|
+
warp_beacon-2.2.66.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
45
|
+
warp_beacon-2.2.66.dist-info/entry_points.txt,sha256=eSB61Rb89d56WY0O-vEIQwkn18J-4CMrJcLA_R_8h3g,119
|
46
|
+
warp_beacon-2.2.66.dist-info/top_level.txt,sha256=q_ThNvU42NteyXqWlEBkaIJTSOK7t-eQ1XW-Fc3V0Eg,1030
|
47
|
+
warp_beacon-2.2.66.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|