Siguen los retoques. Tests locales exitosos, listo para mover a entorno
de pruebas y dejar corriendo junto a explorer.
This commit is contained in:
parent
6a0baf4de6
commit
4edff2e0c1
7 changed files with 177 additions and 81 deletions
|
|
@ -17,7 +17,7 @@ class Capturer:
|
|||
while True:
|
||||
|
||||
if (capturing_interface.get_pending_task() is None
|
||||
and capturing_interface.seconds_since_last_try() < Capturer.minimum_seconds_between_tries):
|
||||
or capturing_interface.seconds_since_last_try() < Capturer.minimum_seconds_between_tries):
|
||||
sleep(Capturer.sleep_time_no_work)
|
||||
continue
|
||||
|
||||
|
|
@ -30,6 +30,7 @@ class Capturer:
|
|||
continue
|
||||
|
||||
capturas_interface.insert_captura(ad_data)
|
||||
task._update_status('Captura inserted')
|
||||
|
||||
|
||||
class CapturingTask:
|
||||
|
|
@ -64,6 +65,7 @@ class CapturingTask:
|
|||
|
||||
self._extract_data()
|
||||
self._check_data()
|
||||
return
|
||||
|
||||
else:
|
||||
self.request_failures += 1
|
||||
|
|
@ -82,7 +84,7 @@ class CapturingTask:
|
|||
self._update_status('Invalid value fields')
|
||||
return
|
||||
|
||||
if not self.parser.fields_missing():
|
||||
if self.parser.fields_missing():
|
||||
self._update_status('Fields missing')
|
||||
return
|
||||
|
||||
|
|
@ -107,7 +109,7 @@ class AdHtmlParser:
|
|||
'value': None},
|
||||
'tamano_categorico': {
|
||||
'found': False,
|
||||
'optional': False,
|
||||
'optional': True,
|
||||
'value': None},
|
||||
'm2': {
|
||||
'found': False,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue