Avances en sistema de deployment y configuracion.
This commit is contained in:
parent
25e52a9e25
commit
9a7ba03cd9
11 changed files with 1054 additions and 215 deletions
411
.idea/workspace.xml
generated
411
.idea/workspace.xml
generated
|
|
@ -1,11 +1,17 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="6e2fbba0-85ff-42d6-8e70-e4cdef1000c8" name="Default Changelist" comment="">
|
<list default="true" id="6e2fbba0-85ff-42d6-8e70-e4cdef1000c8" name="Default Changelist" comment="preparado para empezar pruebas del deployer.">
|
||||||
<change afterPath="$PROJECT_DIR$/db_layer/db_init_scripts/users.sql" afterDir="false" />
|
<change afterPath="$PROJECT_DIR$/core/config.py" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/db_layer/db_init_scripts/1_20181028dump.sql" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/db_layer/db_init_scripts/2_users.sql" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/db_layer/Dockerfile" beforeDir="false" afterPath="$PROJECT_DIR$/db_layer/Dockerfile" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/core/mysql_wrapper.py" beforeDir="false" afterPath="$PROJECT_DIR$/core/mysql_wrapper.py" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/db_layer/db_init_scripts/users.sql" beforeDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/deployer.sh" beforeDir="false" afterPath="$PROJECT_DIR$/deployer.sh" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/deployer.sh" beforeDir="false" afterPath="$PROJECT_DIR$/deployer.sh" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/explorer/explorer.py" beforeDir="false" afterPath="$PROJECT_DIR$/explorer/explorer.py" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/geocoder/geocoder.py" beforeDir="false" afterPath="$PROJECT_DIR$/geocoder/geocoder.py" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/requirements.txt" beforeDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
|
|
@ -17,51 +23,57 @@
|
||||||
<session id="1687213926">
|
<session id="1687213926">
|
||||||
<usages-collector id="statistics.lifecycle.project">
|
<usages-collector id="statistics.lifecycle.project">
|
||||||
<counts>
|
<counts>
|
||||||
<entry key="project.closed" value="7" />
|
<entry key="project.closed" value="8" />
|
||||||
<entry key="project.open.time.0" value="1" />
|
<entry key="project.open.time.0" value="1" />
|
||||||
<entry key="project.open.time.12" value="1" />
|
<entry key="project.open.time.12" value="1" />
|
||||||
<entry key="project.open.time.13" value="2" />
|
<entry key="project.open.time.13" value="3" />
|
||||||
<entry key="project.open.time.14" value="3" />
|
<entry key="project.open.time.14" value="3" />
|
||||||
<entry key="project.open.time.17" value="1" />
|
<entry key="project.open.time.17" value="2" />
|
||||||
<entry key="project.open.time.18" value="2" />
|
<entry key="project.open.time.18" value="2" />
|
||||||
<entry key="project.open.time.2" value="1" />
|
<entry key="project.open.time.2" value="1" />
|
||||||
<entry key="project.open.time.21" value="1" />
|
<entry key="project.open.time.21" value="1" />
|
||||||
<entry key="project.open.time.26" value="1" />
|
<entry key="project.open.time.26" value="1" />
|
||||||
<entry key="project.opened" value="13" />
|
<entry key="project.opened" value="15" />
|
||||||
</counts>
|
</counts>
|
||||||
</usages-collector>
|
</usages-collector>
|
||||||
<usages-collector id="statistics.file.extensions.open">
|
<usages-collector id="statistics.file.extensions.open">
|
||||||
<counts>
|
<counts>
|
||||||
<entry key="Dockerfile" value="2" />
|
<entry key="Dockerfile" value="8" />
|
||||||
<entry key="py" value="75" />
|
<entry key="py" value="90" />
|
||||||
<entry key="sh" value="2" />
|
<entry key="sh" value="4" />
|
||||||
<entry key="sql" value="3" />
|
<entry key="sql" value="5" />
|
||||||
|
<entry key="txt" value="6" />
|
||||||
</counts>
|
</counts>
|
||||||
</usages-collector>
|
</usages-collector>
|
||||||
<usages-collector id="statistics.file.types.open">
|
<usages-collector id="statistics.file.types.open">
|
||||||
<counts>
|
<counts>
|
||||||
<entry key="PLAIN_TEXT" value="4" />
|
<entry key="Bash" value="2" />
|
||||||
<entry key="Python" value="70" />
|
<entry key="DBN-SQL" value="2" />
|
||||||
|
<entry key="PLAIN_TEXT" value="16" />
|
||||||
|
<entry key="Python" value="85" />
|
||||||
<entry key="SQL" value="3" />
|
<entry key="SQL" value="3" />
|
||||||
<entry key="Scratch" value="5" />
|
<entry key="Scratch" value="5" />
|
||||||
</counts>
|
</counts>
|
||||||
</usages-collector>
|
</usages-collector>
|
||||||
<usages-collector id="statistics.file.extensions.edit">
|
<usages-collector id="statistics.file.extensions.edit">
|
||||||
<counts>
|
<counts>
|
||||||
<entry key="Dockerfile" value="37" />
|
<entry key="Dockerfile" value="109" />
|
||||||
<entry key="Python Console" value="1621" />
|
<entry key="Python Console" value="1621" />
|
||||||
<entry key="capturer" value="862" />
|
<entry key="capturer" value="862" />
|
||||||
<entry key="dummy" value="14" />
|
<entry key="dummy" value="14" />
|
||||||
<entry key="py" value="18825" />
|
<entry key="py" value="19356" />
|
||||||
<entry key="scratch_1" value="489" />
|
<entry key="scratch_1" value="489" />
|
||||||
<entry key="sh" value="1179" />
|
<entry key="sh" value="1609" />
|
||||||
<entry key="txt" value="1207" />
|
<entry key="sql" value="53" />
|
||||||
|
<entry key="txt" value="1257" />
|
||||||
</counts>
|
</counts>
|
||||||
</usages-collector>
|
</usages-collector>
|
||||||
<usages-collector id="statistics.file.types.edit">
|
<usages-collector id="statistics.file.types.edit">
|
||||||
<counts>
|
<counts>
|
||||||
<entry key="PLAIN_TEXT" value="2437" />
|
<entry key="Bash" value="430" />
|
||||||
<entry key="Python" value="21525" />
|
<entry key="DBN-SQL" value="53" />
|
||||||
|
<entry key="PLAIN_TEXT" value="2559" />
|
||||||
|
<entry key="Python" value="22056" />
|
||||||
<entry key="Scratch" value="272" />
|
<entry key="Scratch" value="272" />
|
||||||
</counts>
|
</counts>
|
||||||
</usages-collector>
|
</usages-collector>
|
||||||
|
|
@ -77,105 +89,74 @@
|
||||||
<favorites_list name="Drogon" />
|
<favorites_list name="Drogon" />
|
||||||
</component>
|
</component>
|
||||||
<component name="FileEditorManager">
|
<component name="FileEditorManager">
|
||||||
<splitter split-orientation="horizontal" split-proportion="0.5">
|
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||||
<split-first>
|
<file pinned="false" current-in-tab="true">
|
||||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
<entry file="file://$PROJECT_DIR$/deployer.sh">
|
||||||
<file pinned="false" current-in-tab="false">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<entry file="file://$PROJECT_DIR$/db_layer/Dockerfile">
|
<state relative-caret-position="330">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<caret line="76" selection-start-line="76" selection-end-line="76" selection-end-column="29" />
|
||||||
<state relative-caret-position="60">
|
</state>
|
||||||
<caret line="4" column="51" selection-start-line="4" selection-start-column="51" selection-end-line="4" selection-end-column="51" />
|
</provider>
|
||||||
</state>
|
</entry>
|
||||||
</provider>
|
</file>
|
||||||
</entry>
|
<file pinned="false" current-in-tab="false">
|
||||||
</file>
|
<entry file="file://$PROJECT_DIR$/db_layer/Dockerfile">
|
||||||
<file pinned="false" current-in-tab="false">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<entry file="file://$PROJECT_DIR$/db_layer/db_init_scripts/users.sql">
|
<state relative-caret-position="60">
|
||||||
<provider selected="true" editor-type-id="text-editor" />
|
<caret line="4" column="51" selection-start-line="4" selection-start-column="51" selection-end-line="4" selection-end-column="51" />
|
||||||
</entry>
|
</state>
|
||||||
</file>
|
</provider>
|
||||||
<file pinned="false" current-in-tab="false">
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/tests/capturer_tests.py">
|
</file>
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<file pinned="false" current-in-tab="false">
|
||||||
<state>
|
<entry file="file://$PROJECT_DIR$/core/config.py">
|
||||||
<caret selection-end-line="4" />
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
</state>
|
<state relative-caret-position="405">
|
||||||
</provider>
|
<caret line="27" lean-forward="true" selection-start-line="27" selection-end-line="27" />
|
||||||
</entry>
|
<folding>
|
||||||
</file>
|
<element signature="e#0#22#0" expanded="true" />
|
||||||
<file pinned="false" current-in-tab="false">
|
</folding>
|
||||||
<entry file="file://$PROJECT_DIR$/geocoder/geocoder.py">
|
</state>
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
</provider>
|
||||||
<state relative-caret-position="570">
|
</entry>
|
||||||
<caret line="38" column="52" lean-forward="true" selection-start-line="38" selection-start-column="52" selection-end-line="38" selection-end-column="52" />
|
</file>
|
||||||
</state>
|
<file pinned="false" current-in-tab="false">
|
||||||
</provider>
|
<entry file="file://$PROJECT_DIR$/explorer/explorer.py">
|
||||||
</entry>
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
</file>
|
<state relative-caret-position="165">
|
||||||
<file pinned="false" current-in-tab="true">
|
<caret line="95" column="88" selection-start-line="95" selection-start-column="88" selection-end-line="95" selection-end-column="88" />
|
||||||
<entry file="file://$PROJECT_DIR$/deployer.sh">
|
</state>
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
</provider>
|
||||||
<state relative-caret-position="638">
|
</entry>
|
||||||
<caret line="82" lean-forward="true" selection-start-line="82" selection-end-line="82" />
|
</file>
|
||||||
</state>
|
<file pinned="false" current-in-tab="false">
|
||||||
</provider>
|
<entry file="file://$PROJECT_DIR$/capturer/capturer.py">
|
||||||
</entry>
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
</file>
|
<state relative-caret-position="240">
|
||||||
</leaf>
|
<caret line="26" column="34" selection-start-line="26" selection-start-column="34" selection-end-line="26" selection-end-column="34" />
|
||||||
</split-first>
|
</state>
|
||||||
<split-second>
|
</provider>
|
||||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
</entry>
|
||||||
<file pinned="false" current-in-tab="false">
|
</file>
|
||||||
<entry file="file://$PROJECT_DIR$/explorer/explorer.py">
|
<file pinned="false" current-in-tab="false">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<entry file="file://$PROJECT_DIR$/core/mysql_wrapper.py">
|
||||||
<state relative-caret-position="4215">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<caret line="281" selection-start-line="281" selection-end-line="283" selection-end-column="20" />
|
<state relative-caret-position="135">
|
||||||
</state>
|
<caret line="9" lean-forward="true" selection-start-line="9" selection-end-line="9" />
|
||||||
</provider>
|
</state>
|
||||||
</entry>
|
</provider>
|
||||||
</file>
|
</entry>
|
||||||
<file pinned="false" current-in-tab="false">
|
</file>
|
||||||
<entry file="file://$PROJECT_DIR$/core/mysql_wrapper.py">
|
<file pinned="false" current-in-tab="false">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<entry file="file://$PROJECT_DIR$/geocoder/geocoder.py">
|
||||||
<state relative-caret-position="720">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<caret line="49" selection-start-line="49" selection-end-line="49" />
|
<state relative-caret-position="1950">
|
||||||
<folding>
|
<caret line="130" column="22" lean-forward="true" selection-start-line="130" selection-start-column="22" selection-end-line="130" selection-end-column="22" />
|
||||||
<element signature="e#24#46#0" expanded="true" />
|
</state>
|
||||||
</folding>
|
</provider>
|
||||||
</state>
|
</entry>
|
||||||
</provider>
|
</file>
|
||||||
</entry>
|
</leaf>
|
||||||
</file>
|
|
||||||
<file pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/refresher/refresher.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="210">
|
|
||||||
<caret line="16" selection-start-line="16" selection-end-line="16" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file pinned="false" current-in-tab="true">
|
|
||||||
<entry file="file://$PROJECT_DIR$/db_layer/capturas_interface.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="525">
|
|
||||||
<caret line="81" selection-start-line="81" selection-end-line="81" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
<file pinned="false" current-in-tab="false">
|
|
||||||
<entry file="file://$PROJECT_DIR$/tests/geocoder_tests.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state>
|
|
||||||
<caret column="23" selection-start-column="23" selection-end-column="23" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
</file>
|
|
||||||
</leaf>
|
|
||||||
</split-second>
|
|
||||||
</splitter>
|
|
||||||
</component>
|
</component>
|
||||||
<component name="FileTemplateManagerImpl">
|
<component name="FileTemplateManagerImpl">
|
||||||
<option name="RECENT_TEMPLATES">
|
<option name="RECENT_TEMPLATES">
|
||||||
|
|
@ -205,7 +186,7 @@
|
||||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||||
<option name="RECENT_BRANCH_BY_REPOSITORY">
|
<option name="RECENT_BRANCH_BY_REPOSITORY">
|
||||||
<map>
|
<map>
|
||||||
<entry key="$PROJECT_DIR$" value="dev" />
|
<entry key="$PROJECT_DIR$" value="testing" />
|
||||||
</map>
|
</map>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
|
@ -221,17 +202,24 @@
|
||||||
<option value="$PROJECT_DIR$/mysql/capturas_interface.py" />
|
<option value="$PROJECT_DIR$/mysql/capturas_interface.py" />
|
||||||
<option value="$PROJECT_DIR$/tests/capturing_tests.py" />
|
<option value="$PROJECT_DIR$/tests/capturing_tests.py" />
|
||||||
<option value="$PROJECT_DIR$/tests/capturer_tests.py" />
|
<option value="$PROJECT_DIR$/tests/capturer_tests.py" />
|
||||||
<option value="$PROJECT_DIR$/core/mysql_wrapper.py" />
|
|
||||||
<option value="$PROJECT_DIR$/explorer/explorer.py" />
|
|
||||||
<option value="$PROJECT_DIR$/db_layer/capturing_tasks_interface.py" />
|
<option value="$PROJECT_DIR$/db_layer/capturing_tasks_interface.py" />
|
||||||
<option value="$APPLICATION_CONFIG_DIR$/scratches/scratch_1.py" />
|
<option value="$APPLICATION_CONFIG_DIR$/scratches/scratch_1.py" />
|
||||||
<option value="$PROJECT_DIR$/tests/refresher_tests.py" />
|
<option value="$PROJECT_DIR$/tests/refresher_tests.py" />
|
||||||
<option value="$PROJECT_DIR$/refresher/refresher.py" />
|
<option value="$PROJECT_DIR$/refresher/refresher.py" />
|
||||||
<option value="$PROJECT_DIR$/capturer/capturer.py" />
|
<option value="$PROJECT_DIR$/capturer/capturer.py" />
|
||||||
<option value="$PROJECT_DIR$/core/scrapping_utils.py" />
|
<option value="$PROJECT_DIR$/core/scrapping_utils.py" />
|
||||||
<option value="$PROJECT_DIR$/geocoder/geocoder.py" />
|
|
||||||
<option value="$PROJECT_DIR$/db_layer/capturas_interface.py" />
|
<option value="$PROJECT_DIR$/db_layer/capturas_interface.py" />
|
||||||
<option value="$PROJECT_DIR$/db_layer/Dockerfile" />
|
<option value="$PROJECT_DIR$/db_layer/Dockerfile" />
|
||||||
|
<option value="$PROJECT_DIR$/requirements.txt" />
|
||||||
|
<option value="$PROJECT_DIR$/explorer/Dockerfile" />
|
||||||
|
<option value="$PROJECT_DIR$/capturer/Dockerfile" />
|
||||||
|
<option value="$PROJECT_DIR$/geocoder/Dockerfile" />
|
||||||
|
<option value="$PROJECT_DIR$/refresher/Dockerfile" />
|
||||||
|
<option value="$PROJECT_DIR$/core/config.py" />
|
||||||
|
<option value="$PROJECT_DIR$/core/mysql_wrapper.py" />
|
||||||
|
<option value="$PROJECT_DIR$/geocoder/geocoder.py" />
|
||||||
|
<option value="$PROJECT_DIR$/explorer/explorer.py" />
|
||||||
|
<option value="$PROJECT_DIR$/db_layer/db_init_scripts/users.sql" />
|
||||||
<option value="$PROJECT_DIR$/deployer.sh" />
|
<option value="$PROJECT_DIR$/deployer.sh" />
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
|
|
@ -246,7 +234,6 @@
|
||||||
<foldersAlwaysOnTop value="true" />
|
<foldersAlwaysOnTop value="true" />
|
||||||
</navigator>
|
</navigator>
|
||||||
<panes>
|
<panes>
|
||||||
<pane id="Scope" />
|
|
||||||
<pane id="ProjectPane">
|
<pane id="ProjectPane">
|
||||||
<subPane>
|
<subPane>
|
||||||
<expand>
|
<expand>
|
||||||
|
|
@ -254,6 +241,16 @@
|
||||||
<item name="Drogon" type="b2602c69:ProjectViewProjectNode" />
|
<item name="Drogon" type="b2602c69:ProjectViewProjectNode" />
|
||||||
<item name="Drogon" type="462c0819:PsiDirectoryNode" />
|
<item name="Drogon" type="462c0819:PsiDirectoryNode" />
|
||||||
</path>
|
</path>
|
||||||
|
<path>
|
||||||
|
<item name="Drogon" type="b2602c69:ProjectViewProjectNode" />
|
||||||
|
<item name="Drogon" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="capturer" type="462c0819:PsiDirectoryNode" />
|
||||||
|
</path>
|
||||||
|
<path>
|
||||||
|
<item name="Drogon" type="b2602c69:ProjectViewProjectNode" />
|
||||||
|
<item name="Drogon" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="core" type="462c0819:PsiDirectoryNode" />
|
||||||
|
</path>
|
||||||
<path>
|
<path>
|
||||||
<item name="Drogon" type="b2602c69:ProjectViewProjectNode" />
|
<item name="Drogon" type="b2602c69:ProjectViewProjectNode" />
|
||||||
<item name="Drogon" type="462c0819:PsiDirectoryNode" />
|
<item name="Drogon" type="462c0819:PsiDirectoryNode" />
|
||||||
|
|
@ -265,6 +262,16 @@
|
||||||
<item name="db_layer" type="462c0819:PsiDirectoryNode" />
|
<item name="db_layer" type="462c0819:PsiDirectoryNode" />
|
||||||
<item name="db_init_scripts" type="462c0819:PsiDirectoryNode" />
|
<item name="db_init_scripts" type="462c0819:PsiDirectoryNode" />
|
||||||
</path>
|
</path>
|
||||||
|
<path>
|
||||||
|
<item name="Drogon" type="b2602c69:ProjectViewProjectNode" />
|
||||||
|
<item name="Drogon" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="explorer" type="462c0819:PsiDirectoryNode" />
|
||||||
|
</path>
|
||||||
|
<path>
|
||||||
|
<item name="Drogon" type="b2602c69:ProjectViewProjectNode" />
|
||||||
|
<item name="Drogon" type="462c0819:PsiDirectoryNode" />
|
||||||
|
<item name="geocoder" type="462c0819:PsiDirectoryNode" />
|
||||||
|
</path>
|
||||||
<path>
|
<path>
|
||||||
<item name="Drogon" type="b2602c69:ProjectViewProjectNode" />
|
<item name="Drogon" type="b2602c69:ProjectViewProjectNode" />
|
||||||
<item name="Drogon" type="462c0819:PsiDirectoryNode" />
|
<item name="Drogon" type="462c0819:PsiDirectoryNode" />
|
||||||
|
|
@ -292,6 +299,7 @@
|
||||||
<select />
|
<select />
|
||||||
</subPane>
|
</subPane>
|
||||||
</pane>
|
</pane>
|
||||||
|
<pane id="Scope" />
|
||||||
</panes>
|
</panes>
|
||||||
</component>
|
</component>
|
||||||
<component name="PropertiesComponent">
|
<component name="PropertiesComponent">
|
||||||
|
|
@ -301,6 +309,12 @@
|
||||||
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
|
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
|
||||||
</component>
|
</component>
|
||||||
<component name="RecentsManager">
|
<component name="RecentsManager">
|
||||||
|
<key name="CopyFile.RECENT_KEYS">
|
||||||
|
<recent name="$PROJECT_DIR$/geocoder" />
|
||||||
|
<recent name="$PROJECT_DIR$/capturer" />
|
||||||
|
<recent name="$PROJECT_DIR$/refresher" />
|
||||||
|
<recent name="$PROJECT_DIR$/explorer" />
|
||||||
|
</key>
|
||||||
<key name="MoveFile.RECENT_KEYS">
|
<key name="MoveFile.RECENT_KEYS">
|
||||||
<recent name="$PROJECT_DIR$/geocoder" />
|
<recent name="$PROJECT_DIR$/geocoder" />
|
||||||
</key>
|
</key>
|
||||||
|
|
@ -605,11 +619,13 @@
|
||||||
</component>
|
</component>
|
||||||
<component name="ToolWindowManager">
|
<component name="ToolWindowManager">
|
||||||
<frame x="0" y="-2" width="1920" height="1082" extended-state="6" />
|
<frame x="0" y="-2" width="1920" height="1082" extended-state="6" />
|
||||||
|
<editor active="true" />
|
||||||
<layout>
|
<layout>
|
||||||
<window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.48076922" visible="true" weight="0.14918292" />
|
<window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.48076922" visible="true" weight="0.14918292" />
|
||||||
<window_info id="Structure" order="1" sideWeight="0.5192308" side_tool="true" weight="0.14918292" />
|
<window_info id="Structure" order="1" sideWeight="0.5192308" side_tool="true" weight="0.14918292" />
|
||||||
<window_info id="Favorites" order="2" sideWeight="0.5015674" side_tool="true" weight="0.14918292" />
|
<window_info id="Favorites" order="2" sideWeight="0.5015674" side_tool="true" weight="0.14918292" />
|
||||||
<window_info active="true" id="Repositories" order="3" sideWeight="0.49529782" visible="true" weight="0.32999474" />
|
<window_info active="true" id="Repositories" order="3" sideWeight="0.49529782" visible="true" weight="0.32999474" />
|
||||||
|
<window_info id="DB Browser" order="4" weight="0.32999474" />
|
||||||
<window_info anchor="bottom" id="Message" order="0" />
|
<window_info anchor="bottom" id="Message" order="0" />
|
||||||
<window_info anchor="bottom" id="Find" order="1" weight="0.32983193" />
|
<window_info anchor="bottom" id="Find" order="1" weight="0.32983193" />
|
||||||
<window_info anchor="bottom" id="Run" order="2" weight="0.32983193" />
|
<window_info anchor="bottom" id="Run" order="2" weight="0.32983193" />
|
||||||
|
|
@ -621,6 +637,7 @@
|
||||||
<window_info anchor="bottom" id="Terminal" order="8" weight="0.32983193" />
|
<window_info anchor="bottom" id="Terminal" order="8" weight="0.32983193" />
|
||||||
<window_info anchor="bottom" id="Event Log" order="9" sideWeight="0.5007907" side_tool="true" weight="0.32983193" />
|
<window_info anchor="bottom" id="Event Log" order="9" sideWeight="0.5007907" side_tool="true" weight="0.32983193" />
|
||||||
<window_info anchor="bottom" id="Python Console" order="10" sideWeight="0.49920928" weight="0.32983193" />
|
<window_info anchor="bottom" id="Python Console" order="10" sideWeight="0.49920928" weight="0.32983193" />
|
||||||
|
<window_info anchor="bottom" id="DB Execution Console" order="11" />
|
||||||
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
|
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
|
||||||
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
|
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
|
||||||
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
|
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
|
||||||
|
|
@ -696,13 +713,6 @@
|
||||||
</component>
|
</component>
|
||||||
<component name="XDebuggerManager">
|
<component name="XDebuggerManager">
|
||||||
<breakpoint-manager>
|
<breakpoint-manager>
|
||||||
<breakpoints>
|
|
||||||
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
|
|
||||||
<url>file://$PROJECT_DIR$/explorer/explorer.py</url>
|
|
||||||
<line>38</line>
|
|
||||||
<option name="timeStamp" value="7" />
|
|
||||||
</line-breakpoint>
|
|
||||||
</breakpoints>
|
|
||||||
<breakpoints-dialog>
|
<breakpoints-dialog>
|
||||||
<breakpoints-dialog />
|
<breakpoints-dialog />
|
||||||
</breakpoints-dialog>
|
</breakpoints-dialog>
|
||||||
|
|
@ -868,64 +878,23 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/capturer/capturer.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="1125">
|
|
||||||
<caret line="75" column="36" selection-start-line="75" selection-start-column="36" selection-end-line="75" selection-end-column="36" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/core/mysql_wrapper.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="720">
|
|
||||||
<caret line="49" selection-start-line="49" selection-end-line="49" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#24#46#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/core/alerts.py">
|
<entry file="file://$PROJECT_DIR$/core/alerts.py">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="75">
|
<state relative-caret-position="105">
|
||||||
<caret line="7" column="34" selection-start-line="7" selection-start-column="34" selection-end-line="7" selection-end-column="34" />
|
<caret line="7" column="34" selection-start-line="7" selection-start-column="34" selection-end-line="7" selection-end-column="34" />
|
||||||
<folding>
|
|
||||||
<element signature="e#0#46#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/tests/capturer_tests.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state>
|
|
||||||
<caret selection-end-line="4" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/explorer/explorer.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="4215">
|
|
||||||
<caret line="281" selection-start-line="281" selection-end-line="283" selection-end-column="20" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/refresher/refresher.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="210">
|
|
||||||
<caret line="16" selection-start-line="16" selection-end-line="16" />
|
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file:///usr/lib/python3/dist-packages/apport_python_hook.py">
|
<entry file="file:///usr/lib/python3/dist-packages/apport_python_hook.py">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="361">
|
<state relative-caret-position="720">
|
||||||
<caret line="49" column="18" lean-forward="true" selection-start-line="49" selection-start-column="18" selection-end-line="49" selection-end-column="18" />
|
<caret line="49" column="18" selection-start-line="49" selection-start-column="18" selection-end-line="49" selection-end-column="18" />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$APPLICATION_CONFIG_DIR$/scratches/scratch_1.py">
|
<entry file="file://$APPLICATION_CONFIG_DIR$/scratches/scratch_1.py">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="556">
|
<state relative-caret-position="3045">
|
||||||
<caret line="203" column="35" selection-start-line="203" selection-start-column="35" selection-end-line="203" selection-end-column="35" />
|
<caret line="203" column="35" selection-start-line="203" selection-start-column="35" selection-end-line="203" selection-end-column="35" />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
|
|
@ -937,6 +906,41 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/db_layer/db_init_scripts/tables.sql" />
|
||||||
|
<entry file="file://$PROJECT_DIR$/db_layer/db_init_scripts/views.sql" />
|
||||||
|
<entry file="file://$PROJECT_DIR$/db_layer/capturing_tasks_interface.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="15">
|
||||||
|
<caret line="1" selection-start-line="1" selection-end-line="1" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/tests/capturer_tests.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state>
|
||||||
|
<caret selection-end-line="4" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/refresher/refresher.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="240">
|
||||||
|
<caret line="16" selection-start-line="16" selection-end-line="16" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/tests/geocoder_tests.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state>
|
||||||
|
<caret column="23" selection-start-column="23" selection-end-column="23" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/requirements.txt" />
|
||||||
|
<entry file="file://$PROJECT_DIR$/explorer/Dockerfile" />
|
||||||
|
<entry file="file://$PROJECT_DIR$/explorer/requirements.txt" />
|
||||||
|
<entry file="file://$PROJECT_DIR$/capturer/requirements.txt" />
|
||||||
|
<entry file="file://$PROJECT_DIR$/geocoder/requirements.txt" />
|
||||||
<entry file="file://$PROJECT_DIR$/db_layer/capturas_interface.py">
|
<entry file="file://$PROJECT_DIR$/db_layer/capturas_interface.py">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="525">
|
<state relative-caret-position="525">
|
||||||
|
|
@ -944,26 +948,55 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/geocoder/geocoder.py">
|
<entry file="file://$PROJECT_DIR$/capturer/Dockerfile" />
|
||||||
|
<entry file="file://$PROJECT_DIR$/refresher/requirements.txt" />
|
||||||
|
<entry file="file://$PROJECT_DIR$/geocoder/Dockerfile" />
|
||||||
|
<entry file="file://$PROJECT_DIR$/refresher/Dockerfile" />
|
||||||
|
<entry file="file://$PROJECT_DIR$/db_layer/__init__.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor" />
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/core/mysql_wrapper.py">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="570">
|
<state relative-caret-position="135">
|
||||||
<caret line="38" column="52" lean-forward="true" selection-start-line="38" selection-start-column="52" selection-end-line="38" selection-end-column="52" />
|
<caret line="9" lean-forward="true" selection-start-line="9" selection-end-line="9" />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/db_layer/db_init_scripts/tables.sql">
|
<entry file="file://$PROJECT_DIR$/capturer/capturer.py">
|
||||||
<provider selected="true" editor-type-id="text-editor" />
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="240">
|
||||||
|
<caret line="26" column="34" selection-start-line="26" selection-start-column="34" selection-end-line="26" selection-end-column="34" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/db_layer/db_init_scripts/views.sql">
|
<entry file="file://$PROJECT_DIR$/geocoder/geocoder.py">
|
||||||
<provider selected="true" editor-type-id="text-editor" />
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="1950">
|
||||||
|
<caret line="130" column="22" lean-forward="true" selection-start-line="130" selection-start-column="22" selection-end-line="130" selection-end-column="22" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/explorer/explorer.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="165">
|
||||||
|
<caret line="95" column="88" selection-start-line="95" selection-start-column="88" selection-end-line="95" selection-end-column="88" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/core/config.py">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="405">
|
||||||
|
<caret line="27" lean-forward="true" selection-start-line="27" selection-end-line="27" />
|
||||||
|
<folding>
|
||||||
|
<element signature="e#0#22#0" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/db_layer/db_init_scripts/users.sql">
|
<entry file="file://$PROJECT_DIR$/db_layer/db_init_scripts/users.sql">
|
||||||
<provider selected="true" editor-type-id="text-editor" />
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/db_layer/capturing_tasks_interface.py">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="495">
|
<state relative-caret-position="45">
|
||||||
<caret line="34" column="58" selection-start-line="34" selection-start-column="58" selection-end-line="34" selection-end-column="58" />
|
<caret line="3" column="16" lean-forward="true" selection-start-line="3" selection-start-column="16" selection-end-line="3" selection-end-column="16" />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
|
@ -976,8 +1009,8 @@
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/deployer.sh">
|
<entry file="file://$PROJECT_DIR$/deployer.sh">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="638">
|
<state relative-caret-position="330">
|
||||||
<caret line="82" lean-forward="true" selection-start-line="82" selection-end-line="82" />
|
<caret line="76" selection-start-line="76" selection-end-line="76" selection-end-column="29" />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
|
|
||||||
27
core/config.py
Normal file
27
core/config.py
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
from os import environ
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
|
databases = {'dev':{'host': 'dev_drogon_db',
|
||||||
|
'user': 'drogon',
|
||||||
|
'password': 'noesfacilvivirsindrogon'},
|
||||||
|
'tst':{'host': 'tst_drogon_db',
|
||||||
|
'user': 'drogon',
|
||||||
|
'password': 'noesfacilvivirsindrogon'},
|
||||||
|
'prd':{'host': 'prd_drogon_db',
|
||||||
|
'user': 'drogon',
|
||||||
|
'password': 'noesfacilvivirsindrogon'},
|
||||||
|
'default'{'host': 'tst_drogon_db',
|
||||||
|
'user': 'drogon',
|
||||||
|
'password': 'noesfacilvivirsindrogon'}}
|
||||||
|
|
||||||
|
current_db = environ['DROGON_ENV']
|
||||||
|
|
||||||
|
try:
|
||||||
|
current_db_parameters = databases[current_db]
|
||||||
|
except KeyError:
|
||||||
|
current_db_parameters = databases['default']
|
||||||
|
|
||||||
|
working_hours = {'start': datetime.time(9, 0, 0),
|
||||||
|
'end': datetime.time(21, 0, 0)}
|
||||||
|
monthly_new_ads_target = 1000
|
||||||
|
google_api_key = 'AIzaSyCnKj0WnsxVZcaoxeAYkuRw3cKRNGiISYA'
|
||||||
|
|
@ -1,16 +1,12 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
import sys
|
||||||
|
sys.path.append('..')
|
||||||
import mysql.connector
|
import mysql.connector
|
||||||
from core.alerts import alert_master
|
from core.alerts import alert_master
|
||||||
|
from core.config import current_db_parameters
|
||||||
|
|
||||||
anuncios_db_parameters = {'host': '185.166.215.170',
|
anuncios_db_parameters = current_db_parameters.update({'database': 'anuncios'})
|
||||||
'database': 'anuncios',
|
tasks_db_parameters = current_db_parameters.update({'database': 'tasks'})
|
||||||
'user': 'drogon',
|
|
||||||
'password': 'noesfacilvivirsindrogon'}
|
|
||||||
|
|
||||||
tasks_db_parameters = {'host': '185.166.215.170',
|
|
||||||
'database': 'tasks',
|
|
||||||
'user': 'drogon',
|
|
||||||
'password': 'noesfacilvivirsindrogon'}
|
|
||||||
|
|
||||||
class DatabaseWrapper():
|
class DatabaseWrapper():
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,5 @@ FROM mysql:5.7.23
|
||||||
|
|
||||||
ENV MYSQL_ROOT_PASSWORD="noesfacilvivirsindrogon"
|
ENV MYSQL_ROOT_PASSWORD="noesfacilvivirsindrogon"
|
||||||
|
|
||||||
COPY db_init_scripts/* /docker-entrypoint-initdb.d/
|
COPY db_init_scripts/ /docker-entrypoint-initdb.d/
|
||||||
|
|
||||||
|
|
|
||||||
760
db_layer/db_init_scripts/1_20181028dump.sql
Normal file
760
db_layer/db_init_scripts/1_20181028dump.sql
Normal file
|
|
@ -0,0 +1,760 @@
|
||||||
|
-- MySQL dump 10.13 Distrib 5.7.24, for Linux (x86_64)
|
||||||
|
--
|
||||||
|
-- Host: 185.166.215.170 Database: tasks
|
||||||
|
-- ------------------------------------------------------
|
||||||
|
-- Server version 5.7.23
|
||||||
|
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||||
|
/*!40101 SET NAMES utf8 */;
|
||||||
|
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||||
|
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||||
|
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||||
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||||
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||||
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Current Database: `tasks`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `tasks` /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_spanish_ci */;
|
||||||
|
|
||||||
|
USE `tasks`;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Temporary table structure for view `capturing_first`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `capturing_first`;
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `capturing_first`*/;
|
||||||
|
SET @saved_cs_client = @@character_set_client;
|
||||||
|
SET character_set_client = utf8;
|
||||||
|
/*!50001 CREATE VIEW `capturing_first` AS SELECT
|
||||||
|
1 AS `uuid`,
|
||||||
|
1 AS `fk_uuid_exploring`,
|
||||||
|
1 AS `write_time`,
|
||||||
|
1 AS `status`,
|
||||||
|
1 AS `ad_url`,
|
||||||
|
1 AS `row_id`*/;
|
||||||
|
SET character_set_client = @saved_cs_client;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Temporary table structure for view `capturing_last`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `capturing_last`;
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `capturing_last`*/;
|
||||||
|
SET @saved_cs_client = @@character_set_client;
|
||||||
|
SET character_set_client = utf8;
|
||||||
|
/*!50001 CREATE VIEW `capturing_last` AS SELECT
|
||||||
|
1 AS `uuid`,
|
||||||
|
1 AS `fk_uuid_exploring`,
|
||||||
|
1 AS `write_time`,
|
||||||
|
1 AS `status`,
|
||||||
|
1 AS `ad_url`,
|
||||||
|
1 AS `row_id`*/;
|
||||||
|
SET character_set_client = @saved_cs_client;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `capturing_tasks_logs`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `capturing_tasks_logs`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
|
CREATE TABLE `capturing_tasks_logs` (
|
||||||
|
`uuid` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
|
||||||
|
`fk_uuid_exploring` varchar(50) CHARACTER SET latin1 DEFAULT NULL,
|
||||||
|
`write_time` datetime NOT NULL,
|
||||||
|
`status` varchar(255) COLLATE latin1_spanish_ci NOT NULL,
|
||||||
|
`ad_url` varchar(255) COLLATE latin1_spanish_ci NOT NULL,
|
||||||
|
`row_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
PRIMARY KEY (`row_id`),
|
||||||
|
KEY `uuid_index` (`uuid`),
|
||||||
|
KEY `write_time_index` (`write_time`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=21826 DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Temporary table structure for view `exploring_first`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `exploring_first`;
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `exploring_first`*/;
|
||||||
|
SET @saved_cs_client = @@character_set_client;
|
||||||
|
SET character_set_client = utf8;
|
||||||
|
/*!50001 CREATE VIEW `exploring_first` AS SELECT
|
||||||
|
1 AS `uuid`,
|
||||||
|
1 AS `write_time`,
|
||||||
|
1 AS `status`,
|
||||||
|
1 AS `row_id`*/;
|
||||||
|
SET character_set_client = @saved_cs_client;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Temporary table structure for view `exploring_last`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `exploring_last`;
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `exploring_last`*/;
|
||||||
|
SET @saved_cs_client = @@character_set_client;
|
||||||
|
SET character_set_client = utf8;
|
||||||
|
/*!50001 CREATE VIEW `exploring_last` AS SELECT
|
||||||
|
1 AS `uuid`,
|
||||||
|
1 AS `write_time`,
|
||||||
|
1 AS `status`,
|
||||||
|
1 AS `row_id`*/;
|
||||||
|
SET character_set_client = @saved_cs_client;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `exploring_tasks_logs`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `exploring_tasks_logs`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
|
CREATE TABLE `exploring_tasks_logs` (
|
||||||
|
`uuid` varchar(50) COLLATE latin1_spanish_ci NOT NULL,
|
||||||
|
`write_time` datetime NOT NULL,
|
||||||
|
`status` varchar(255) COLLATE latin1_spanish_ci NOT NULL,
|
||||||
|
`row_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
PRIMARY KEY (`row_id`),
|
||||||
|
KEY `uuid_index` (`uuid`),
|
||||||
|
KEY `write_time_index` (`write_time`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=597 DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Current Database: `anuncios`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `anuncios` /*!40100 DEFAULT CHARACTER SET latin1 */;
|
||||||
|
|
||||||
|
USE `anuncios`;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Temporary table structure for view `alquiler_altacalidad`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `alquiler_altacalidad`;
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `alquiler_altacalidad`*/;
|
||||||
|
SET @saved_cs_client = @@character_set_client;
|
||||||
|
SET character_set_client = utf8;
|
||||||
|
/*!50001 CREATE VIEW `alquiler_altacalidad` AS SELECT
|
||||||
|
1 AS `fecha_captura`,
|
||||||
|
1 AS `referencia`,
|
||||||
|
1 AS `precio`,
|
||||||
|
1 AS `tamano_categorico`,
|
||||||
|
1 AS `tipo_anuncio`,
|
||||||
|
1 AS `calle`,
|
||||||
|
1 AS `barrio`,
|
||||||
|
1 AS `distrito`,
|
||||||
|
1 AS `ciudad`,
|
||||||
|
1 AS `latitud`,
|
||||||
|
1 AS `longitud`,
|
||||||
|
1 AS `cubierta`,
|
||||||
|
1 AS `puerta_auto`,
|
||||||
|
1 AS `ascensor`,
|
||||||
|
1 AS `alarma`,
|
||||||
|
1 AS `circuito`,
|
||||||
|
1 AS `personal`,
|
||||||
|
1 AS `telefono`,
|
||||||
|
1 AS `precision`*/;
|
||||||
|
SET character_set_client = @saved_cs_client;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `capturas`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `capturas`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
|
CREATE TABLE `capturas` (
|
||||||
|
`fecha_captura` datetime NOT NULL,
|
||||||
|
`referencia` int(11) NOT NULL,
|
||||||
|
`precio` int(11) NOT NULL,
|
||||||
|
`m2` int(11) DEFAULT NULL,
|
||||||
|
`tamano_categorico` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
|
||||||
|
`tipo_anuncio` int(11) NOT NULL,
|
||||||
|
`calle` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
|
`barrio` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
|
`distrito` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
|
`ciudad` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
|
`latitud` decimal(20,10) DEFAULT NULL,
|
||||||
|
`longitud` decimal(20,10) DEFAULT NULL,
|
||||||
|
`cubierta` int(11) DEFAULT NULL,
|
||||||
|
`puerta_auto` int(11) DEFAULT NULL,
|
||||||
|
`ascensor` int(11) DEFAULT NULL,
|
||||||
|
`alarma` int(11) DEFAULT NULL,
|
||||||
|
`circuito` int(11) DEFAULT NULL,
|
||||||
|
`personal` int(11) DEFAULT NULL,
|
||||||
|
`telefono` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
|
`precision` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
|
KEY `idx_capturas_fecha_captura` (`fecha_captura`),
|
||||||
|
KEY `idx_capturas_referencia` (`referencia`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Temporary table structure for view `capturas_sin_ref_null`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `capturas_sin_ref_null`;
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `capturas_sin_ref_null`*/;
|
||||||
|
SET @saved_cs_client = @@character_set_client;
|
||||||
|
SET character_set_client = utf8;
|
||||||
|
/*!50001 CREATE VIEW `capturas_sin_ref_null` AS SELECT
|
||||||
|
1 AS `fecha_captura`,
|
||||||
|
1 AS `referencia`,
|
||||||
|
1 AS `precio`,
|
||||||
|
1 AS `tamano_categorico`,
|
||||||
|
1 AS `tipo_anuncio`,
|
||||||
|
1 AS `calle`,
|
||||||
|
1 AS `barrio`,
|
||||||
|
1 AS `distrito`,
|
||||||
|
1 AS `ciudad`,
|
||||||
|
1 AS `latitud`,
|
||||||
|
1 AS `longitud`,
|
||||||
|
1 AS `cubierta`,
|
||||||
|
1 AS `puerta_auto`,
|
||||||
|
1 AS `ascensor`,
|
||||||
|
1 AS `alarma`,
|
||||||
|
1 AS `circuito`,
|
||||||
|
1 AS `personal`,
|
||||||
|
1 AS `telefono`,
|
||||||
|
1 AS `precision`*/;
|
||||||
|
SET character_set_client = @saved_cs_client;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Temporary table structure for view `dias_de_vida`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `dias_de_vida`;
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `dias_de_vida`*/;
|
||||||
|
SET @saved_cs_client = @@character_set_client;
|
||||||
|
SET character_set_client = utf8;
|
||||||
|
/*!50001 CREATE VIEW `dias_de_vida` AS SELECT
|
||||||
|
1 AS `referencia`,
|
||||||
|
1 AS `dias`,
|
||||||
|
1 AS `primer_dia`,
|
||||||
|
1 AS `ultimo_dia`*/;
|
||||||
|
SET character_set_client = @saved_cs_client;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Temporary table structure for view `nacimientos_defunciones_mensuales`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `nacimientos_defunciones_mensuales`;
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `nacimientos_defunciones_mensuales`*/;
|
||||||
|
SET @saved_cs_client = @@character_set_client;
|
||||||
|
SET character_set_client = utf8;
|
||||||
|
/*!50001 CREATE VIEW `nacimientos_defunciones_mensuales` AS SELECT
|
||||||
|
1 AS `año`,
|
||||||
|
1 AS `mes`,
|
||||||
|
1 AS `nacimientos`,
|
||||||
|
1 AS `defunciones`*/;
|
||||||
|
SET character_set_client = @saved_cs_client;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Temporary table structure for view `primera_captura_full`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `primera_captura_full`;
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `primera_captura_full`*/;
|
||||||
|
SET @saved_cs_client = @@character_set_client;
|
||||||
|
SET character_set_client = utf8;
|
||||||
|
/*!50001 CREATE VIEW `primera_captura_full` AS SELECT
|
||||||
|
1 AS `fecha_captura`,
|
||||||
|
1 AS `referencia`,
|
||||||
|
1 AS `precio`,
|
||||||
|
1 AS `tamano_categorico`,
|
||||||
|
1 AS `tipo_anuncio`,
|
||||||
|
1 AS `calle`,
|
||||||
|
1 AS `barrio`,
|
||||||
|
1 AS `distrito`,
|
||||||
|
1 AS `ciudad`,
|
||||||
|
1 AS `latitud`,
|
||||||
|
1 AS `longitud`,
|
||||||
|
1 AS `cubierta`,
|
||||||
|
1 AS `puerta_auto`,
|
||||||
|
1 AS `ascensor`,
|
||||||
|
1 AS `alarma`,
|
||||||
|
1 AS `circuito`,
|
||||||
|
1 AS `personal`,
|
||||||
|
1 AS `telefono`,
|
||||||
|
1 AS `precision`*/;
|
||||||
|
SET character_set_client = @saved_cs_client;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `simulaciones`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `simulaciones`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
|
CREATE TABLE `simulaciones` (
|
||||||
|
`referencia` int(11) NOT NULL,
|
||||||
|
`escenario` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
|
`meses` int(11) NOT NULL,
|
||||||
|
`precio_compra` int(11) DEFAULT NULL,
|
||||||
|
`precio_venta` decimal(16,4) DEFAULT NULL,
|
||||||
|
`precio_alquiler_mensual` decimal(16,4) DEFAULT NULL,
|
||||||
|
`porcen_itp` decimal(16,4) DEFAULT NULL,
|
||||||
|
`porcen_gastos_compra` decimal(16,4) DEFAULT NULL,
|
||||||
|
`comunidad_anual` decimal(16,4) DEFAULT NULL,
|
||||||
|
`ibi_anual` decimal(16,4) DEFAULT NULL,
|
||||||
|
`porcen_impuesto_venta` decimal(16,4) DEFAULT NULL,
|
||||||
|
`anos` int(11) DEFAULT NULL,
|
||||||
|
`ingresos_venta` decimal(16,4) DEFAULT NULL,
|
||||||
|
`ingresos_alquiler` decimal(16,4) DEFAULT NULL,
|
||||||
|
`coste_compra` decimal(16,4) DEFAULT NULL,
|
||||||
|
`coste_propiedad` decimal(16,4) DEFAULT NULL,
|
||||||
|
`beneficio_venta` decimal(16,4) DEFAULT NULL,
|
||||||
|
`beneficio_alquiler` decimal(16,4) DEFAULT NULL,
|
||||||
|
`impuestos_venta` decimal(16,4) DEFAULT NULL,
|
||||||
|
`beneficio_neto` decimal(16,4) DEFAULT NULL,
|
||||||
|
`rentabilidad` decimal(16,4) DEFAULT NULL,
|
||||||
|
`tae` decimal(16,4) DEFAULT NULL,
|
||||||
|
`beneficio_bruto` decimal(16,4) DEFAULT NULL,
|
||||||
|
`exito_alquiler` decimal(16,4) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`referencia`,`escenario`,`meses`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Temporary table structure for view `ultima_captura`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `ultima_captura`;
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `ultima_captura`*/;
|
||||||
|
SET @saved_cs_client = @@character_set_client;
|
||||||
|
SET character_set_client = utf8;
|
||||||
|
/*!50001 CREATE VIEW `ultima_captura` AS SELECT
|
||||||
|
1 AS `fecha_captura`,
|
||||||
|
1 AS `referencia`,
|
||||||
|
1 AS `precio`,
|
||||||
|
1 AS `tamano_categorico`,
|
||||||
|
1 AS `tipo_anuncio`,
|
||||||
|
1 AS `calle`,
|
||||||
|
1 AS `barrio`,
|
||||||
|
1 AS `distrito`,
|
||||||
|
1 AS `ciudad`,
|
||||||
|
1 AS `latitud`,
|
||||||
|
1 AS `longitud`,
|
||||||
|
1 AS `cubierta`,
|
||||||
|
1 AS `puerta_auto`,
|
||||||
|
1 AS `ascensor`,
|
||||||
|
1 AS `alarma`,
|
||||||
|
1 AS `circuito`,
|
||||||
|
1 AS `personal`,
|
||||||
|
1 AS `telefono`,
|
||||||
|
1 AS `precision`*/;
|
||||||
|
SET character_set_client = @saved_cs_client;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Temporary table structure for view `ultima_captura_full`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `ultima_captura_full`;
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `ultima_captura_full`*/;
|
||||||
|
SET @saved_cs_client = @@character_set_client;
|
||||||
|
SET character_set_client = utf8;
|
||||||
|
/*!50001 CREATE VIEW `ultima_captura_full` AS SELECT
|
||||||
|
1 AS `fecha_captura`,
|
||||||
|
1 AS `referencia`,
|
||||||
|
1 AS `precio`,
|
||||||
|
1 AS `tamano_categorico`,
|
||||||
|
1 AS `tipo_anuncio`,
|
||||||
|
1 AS `calle`,
|
||||||
|
1 AS `barrio`,
|
||||||
|
1 AS `distrito`,
|
||||||
|
1 AS `ciudad`,
|
||||||
|
1 AS `latitud`,
|
||||||
|
1 AS `longitud`,
|
||||||
|
1 AS `cubierta`,
|
||||||
|
1 AS `puerta_auto`,
|
||||||
|
1 AS `ascensor`,
|
||||||
|
1 AS `alarma`,
|
||||||
|
1 AS `circuito`,
|
||||||
|
1 AS `personal`,
|
||||||
|
1 AS `telefono`,
|
||||||
|
1 AS `precision`*/;
|
||||||
|
SET character_set_client = @saved_cs_client;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `valoraciones`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `valoraciones`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
|
CREATE TABLE `valoraciones` (
|
||||||
|
`fecha_captura` datetime NOT NULL,
|
||||||
|
`referencia` int(11) NOT NULL,
|
||||||
|
`precio` int(11) NOT NULL,
|
||||||
|
`tamano_categorico` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
|
`tipo_anuncio` int(11) NOT NULL,
|
||||||
|
`calle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
|
`barrio` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
|
`distrito` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
|
`ciudad` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
|
`latitud` decimal(20,10) DEFAULT NULL,
|
||||||
|
`longitud` decimal(20,10) DEFAULT NULL,
|
||||||
|
`cubierta` int(11) DEFAULT NULL,
|
||||||
|
`puerta_auto` int(11) DEFAULT NULL,
|
||||||
|
`ascensor` int(11) DEFAULT NULL,
|
||||||
|
`alarma` int(11) DEFAULT NULL,
|
||||||
|
`circuito` int(11) DEFAULT NULL,
|
||||||
|
`personal` int(11) DEFAULT NULL,
|
||||||
|
`telefono` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
|
`precision` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
|
`venta_valor_knn_corto` double DEFAULT NULL,
|
||||||
|
`venta_valor_knn_largo` double DEFAULT NULL,
|
||||||
|
`venta_valor_knn_custom` double DEFAULT NULL,
|
||||||
|
`venta_dist_knn_corto` double DEFAULT NULL,
|
||||||
|
`venta_dist_knn_largo` double DEFAULT NULL,
|
||||||
|
`venta_dist_knn_custom` double DEFAULT NULL,
|
||||||
|
`venta_valor_rf` double DEFAULT NULL,
|
||||||
|
`alquiler_valor_knn_corto` double DEFAULT NULL,
|
||||||
|
`alquiler_valor_knn_largo` double DEFAULT NULL,
|
||||||
|
`alquiler_valor_knn_custom` double DEFAULT NULL,
|
||||||
|
`alquiler_valor_rf` double DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`referencia`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `vecinos`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `vecinos`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
|
CREATE TABLE `vecinos` (
|
||||||
|
`referencia` int(11) NOT NULL,
|
||||||
|
`referencia_vecino` int(11) NOT NULL,
|
||||||
|
`ranking` int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (`referencia`,`referencia_vecino`),
|
||||||
|
KEY `idx_vecinos_referencia_vecino` (`referencia_vecino`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Temporary table structure for view `vecinos_con_datos`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `vecinos_con_datos`;
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `vecinos_con_datos`*/;
|
||||||
|
SET @saved_cs_client = @@character_set_client;
|
||||||
|
SET character_set_client = utf8;
|
||||||
|
/*!50001 CREATE VIEW `vecinos_con_datos` AS SELECT
|
||||||
|
1 AS `referencia_central`,
|
||||||
|
1 AS `ranking`,
|
||||||
|
1 AS `fecha_captura`,
|
||||||
|
1 AS `referencia`,
|
||||||
|
1 AS `precio`,
|
||||||
|
1 AS `tamano_categorico`,
|
||||||
|
1 AS `tipo_anuncio`,
|
||||||
|
1 AS `calle`,
|
||||||
|
1 AS `barrio`,
|
||||||
|
1 AS `distrito`,
|
||||||
|
1 AS `ciudad`,
|
||||||
|
1 AS `latitud`,
|
||||||
|
1 AS `longitud`,
|
||||||
|
1 AS `cubierta`,
|
||||||
|
1 AS `puerta_auto`,
|
||||||
|
1 AS `ascensor`,
|
||||||
|
1 AS `alarma`,
|
||||||
|
1 AS `circuito`,
|
||||||
|
1 AS `personal`,
|
||||||
|
1 AS `telefono`,
|
||||||
|
1 AS `precision`*/;
|
||||||
|
SET character_set_client = @saved_cs_client;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Temporary table structure for view `venta_altacalidad`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `venta_altacalidad`;
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `venta_altacalidad`*/;
|
||||||
|
SET @saved_cs_client = @@character_set_client;
|
||||||
|
SET character_set_client = utf8;
|
||||||
|
/*!50001 CREATE VIEW `venta_altacalidad` AS SELECT
|
||||||
|
1 AS `fecha_captura`,
|
||||||
|
1 AS `referencia`,
|
||||||
|
1 AS `precio`,
|
||||||
|
1 AS `tamano_categorico`,
|
||||||
|
1 AS `tipo_anuncio`,
|
||||||
|
1 AS `calle`,
|
||||||
|
1 AS `barrio`,
|
||||||
|
1 AS `distrito`,
|
||||||
|
1 AS `ciudad`,
|
||||||
|
1 AS `latitud`,
|
||||||
|
1 AS `longitud`,
|
||||||
|
1 AS `cubierta`,
|
||||||
|
1 AS `puerta_auto`,
|
||||||
|
1 AS `ascensor`,
|
||||||
|
1 AS `alarma`,
|
||||||
|
1 AS `circuito`,
|
||||||
|
1 AS `personal`,
|
||||||
|
1 AS `telefono`,
|
||||||
|
1 AS `precision`*/;
|
||||||
|
SET character_set_client = @saved_cs_client;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Current Database: `tasks`
|
||||||
|
--
|
||||||
|
|
||||||
|
USE `tasks`;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Final view structure for view `capturing_first`
|
||||||
|
--
|
||||||
|
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `capturing_first`*/;
|
||||||
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
|
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||||
|
/*!50001 SET character_set_client = utf8 */;
|
||||||
|
/*!50001 SET character_set_results = utf8 */;
|
||||||
|
/*!50001 SET collation_connection = utf8_general_ci */;
|
||||||
|
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||||
|
/*!50013 DEFINER=`drogon`@`%` SQL SECURITY DEFINER */
|
||||||
|
/*!50001 VIEW `capturing_first` AS (select `t1`.`uuid` AS `uuid`,`t1`.`fk_uuid_exploring` AS `fk_uuid_exploring`,`t1`.`write_time` AS `write_time`,`t1`.`status` AS `status`,`t1`.`ad_url` AS `ad_url`,`t1`.`row_id` AS `row_id` from `capturing_tasks_logs` `t1` where (`t1`.`row_id` = (select min(`t2`.`row_id`) from `capturing_tasks_logs` `t2` where (`t1`.`uuid` = `t2`.`uuid`)))) */;
|
||||||
|
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||||
|
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||||
|
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Final view structure for view `capturing_last`
|
||||||
|
--
|
||||||
|
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `capturing_last`*/;
|
||||||
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
|
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||||
|
/*!50001 SET character_set_client = utf8 */;
|
||||||
|
/*!50001 SET character_set_results = utf8 */;
|
||||||
|
/*!50001 SET collation_connection = utf8_general_ci */;
|
||||||
|
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||||
|
/*!50013 DEFINER=`drogon`@`%` SQL SECURITY DEFINER */
|
||||||
|
/*!50001 VIEW `capturing_last` AS (select `t1`.`uuid` AS `uuid`,`t1`.`fk_uuid_exploring` AS `fk_uuid_exploring`,`t1`.`write_time` AS `write_time`,`t1`.`status` AS `status`,`t1`.`ad_url` AS `ad_url`,`t1`.`row_id` AS `row_id` from `capturing_tasks_logs` `t1` where (`t1`.`row_id` = (select max(`t2`.`row_id`) from `capturing_tasks_logs` `t2` where (`t1`.`uuid` = `t2`.`uuid`)))) */;
|
||||||
|
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||||
|
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||||
|
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Final view structure for view `exploring_first`
|
||||||
|
--
|
||||||
|
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `exploring_first`*/;
|
||||||
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
|
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||||
|
/*!50001 SET character_set_client = utf8 */;
|
||||||
|
/*!50001 SET character_set_results = utf8 */;
|
||||||
|
/*!50001 SET collation_connection = utf8_general_ci */;
|
||||||
|
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||||
|
/*!50013 DEFINER=`drogon`@`%` SQL SECURITY DEFINER */
|
||||||
|
/*!50001 VIEW `exploring_first` AS (select `t1`.`uuid` AS `uuid`,`t1`.`write_time` AS `write_time`,`t1`.`status` AS `status`,`t1`.`row_id` AS `row_id` from `exploring_tasks_logs` `t1` where (`t1`.`row_id` = (select min(`t2`.`row_id`) from `exploring_tasks_logs` `t2` where (`t1`.`uuid` = `t2`.`uuid`)))) */;
|
||||||
|
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||||
|
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||||
|
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Final view structure for view `exploring_last`
|
||||||
|
--
|
||||||
|
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `exploring_last`*/;
|
||||||
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
|
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||||
|
/*!50001 SET character_set_client = utf8 */;
|
||||||
|
/*!50001 SET character_set_results = utf8 */;
|
||||||
|
/*!50001 SET collation_connection = utf8_general_ci */;
|
||||||
|
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||||
|
/*!50013 DEFINER=`drogon`@`%` SQL SECURITY DEFINER */
|
||||||
|
/*!50001 VIEW `exploring_last` AS (select `t1`.`uuid` AS `uuid`,`t1`.`write_time` AS `write_time`,`t1`.`status` AS `status`,`t1`.`row_id` AS `row_id` from `exploring_tasks_logs` `t1` where (`t1`.`row_id` = (select max(`t2`.`row_id`) from `exploring_tasks_logs` `t2` where (`t1`.`uuid` = `t2`.`uuid`)))) */;
|
||||||
|
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||||
|
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||||
|
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Current Database: `anuncios`
|
||||||
|
--
|
||||||
|
|
||||||
|
USE `anuncios`;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Final view structure for view `alquiler_altacalidad`
|
||||||
|
--
|
||||||
|
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `alquiler_altacalidad`*/;
|
||||||
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
|
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||||
|
/*!50001 SET character_set_client = utf8 */;
|
||||||
|
/*!50001 SET character_set_results = utf8 */;
|
||||||
|
/*!50001 SET collation_connection = utf8_general_ci */;
|
||||||
|
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||||
|
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
|
||||||
|
/*!50001 VIEW `alquiler_altacalidad` AS (select `ultima_captura`.`fecha_captura` AS `fecha_captura`,`ultima_captura`.`referencia` AS `referencia`,`ultima_captura`.`precio` AS `precio`,`ultima_captura`.`tamano_categorico` AS `tamano_categorico`,`ultima_captura`.`tipo_anuncio` AS `tipo_anuncio`,`ultima_captura`.`calle` AS `calle`,`ultima_captura`.`barrio` AS `barrio`,`ultima_captura`.`distrito` AS `distrito`,`ultima_captura`.`ciudad` AS `ciudad`,`ultima_captura`.`latitud` AS `latitud`,`ultima_captura`.`longitud` AS `longitud`,`ultima_captura`.`cubierta` AS `cubierta`,`ultima_captura`.`puerta_auto` AS `puerta_auto`,`ultima_captura`.`ascensor` AS `ascensor`,`ultima_captura`.`alarma` AS `alarma`,`ultima_captura`.`circuito` AS `circuito`,`ultima_captura`.`personal` AS `personal`,`ultima_captura`.`telefono` AS `telefono`,`ultima_captura`.`precision` AS `precision` from `ultima_captura` where ((`ultima_captura`.`precision` = 'ROOFTOP') and (`ultima_captura`.`tamano_categorico` <> '2 coches o más') and (`ultima_captura`.`tamano_categorico` <> '') and (`ultima_captura`.`tipo_anuncio` = 2))) */;
|
||||||
|
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||||
|
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||||
|
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Final view structure for view `capturas_sin_ref_null`
|
||||||
|
--
|
||||||
|
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `capturas_sin_ref_null`*/;
|
||||||
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
|
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||||
|
/*!50001 SET character_set_client = utf8 */;
|
||||||
|
/*!50001 SET character_set_results = utf8 */;
|
||||||
|
/*!50001 SET collation_connection = utf8_general_ci */;
|
||||||
|
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||||
|
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
|
||||||
|
/*!50001 VIEW `capturas_sin_ref_null` AS (select `capturas`.`fecha_captura` AS `fecha_captura`,`capturas`.`referencia` AS `referencia`,`capturas`.`precio` AS `precio`,`capturas`.`tamano_categorico` AS `tamano_categorico`,`capturas`.`tipo_anuncio` AS `tipo_anuncio`,`capturas`.`calle` AS `calle`,`capturas`.`barrio` AS `barrio`,`capturas`.`distrito` AS `distrito`,`capturas`.`ciudad` AS `ciudad`,`capturas`.`latitud` AS `latitud`,`capturas`.`longitud` AS `longitud`,`capturas`.`cubierta` AS `cubierta`,`capturas`.`puerta_auto` AS `puerta_auto`,`capturas`.`ascensor` AS `ascensor`,`capturas`.`alarma` AS `alarma`,`capturas`.`circuito` AS `circuito`,`capturas`.`personal` AS `personal`,`capturas`.`telefono` AS `telefono`,`capturas`.`precision` AS `precision` from `capturas` where (`capturas`.`referencia` <> 0)) */;
|
||||||
|
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||||
|
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||||
|
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Final view structure for view `dias_de_vida`
|
||||||
|
--
|
||||||
|
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `dias_de_vida`*/;
|
||||||
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
|
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||||
|
/*!50001 SET character_set_client = utf8 */;
|
||||||
|
/*!50001 SET character_set_results = utf8 */;
|
||||||
|
/*!50001 SET collation_connection = utf8_general_ci */;
|
||||||
|
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||||
|
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
|
||||||
|
/*!50001 VIEW `dias_de_vida` AS (select `p`.`referencia` AS `referencia`,(`u`.`fecha_captura` - `p`.`fecha_captura`) AS `dias`,`p`.`fecha_captura` AS `primer_dia`,`u`.`fecha_captura` AS `ultimo_dia` from (`primera_captura_full` `p` join `ultima_captura_full` `u` on((`p`.`referencia` = `u`.`referencia`)))) */;
|
||||||
|
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||||
|
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||||
|
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Final view structure for view `nacimientos_defunciones_mensuales`
|
||||||
|
--
|
||||||
|
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `nacimientos_defunciones_mensuales`*/;
|
||||||
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
|
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||||
|
/*!50001 SET character_set_client = utf8 */;
|
||||||
|
/*!50001 SET character_set_results = utf8 */;
|
||||||
|
/*!50001 SET collation_connection = utf8_general_ci */;
|
||||||
|
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||||
|
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
|
||||||
|
/*!50001 VIEW `nacimientos_defunciones_mensuales` AS (select `nacimientos_mes`.`año` AS `año`,`nacimientos_mes`.`mes` AS `mes`,`nacimientos_mes`.`nacimientos` AS `nacimientos`,`defunciones_mes`.`defunciones` AS `defunciones` from (((select year(`nacimientos`.`fecha_nacimiento`) AS `año`,month(`nacimientos`.`fecha_nacimiento`) AS `mes`,count(`nacimientos`.`referencia`) AS `nacimientos` from (select `capturas_sin_ref_null`.`referencia` AS `referencia`,min(`capturas_sin_ref_null`.`fecha_captura`) AS `fecha_nacimiento` from `anuncios`.`capturas_sin_ref_null` group by `capturas_sin_ref_null`.`referencia`) `nacimientos` group by `año`,`mes` order by `año`,`mes`)) `nacimientos_mes` join (select year(`defunciones`.`fecha_defuncion`) AS `año`,month(`defunciones`.`fecha_defuncion`) AS `mes`,count(`defunciones`.`referencia`) AS `defunciones` from (select `capturas_sin_ref_null`.`referencia` AS `referencia`,max(`capturas_sin_ref_null`.`fecha_captura`) AS `fecha_defuncion` from `anuncios`.`capturas_sin_ref_null` group by `capturas_sin_ref_null`.`referencia`) `defunciones` group by `año`,`mes` order by `año`,`mes`) `defunciones_mes` on(((`nacimientos_mes`.`año` = `defunciones_mes`.`año`) and (`nacimientos_mes`.`mes` = `defunciones_mes`.`mes`))))) */;
|
||||||
|
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||||
|
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||||
|
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Final view structure for view `primera_captura_full`
|
||||||
|
--
|
||||||
|
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `primera_captura_full`*/;
|
||||||
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
|
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||||
|
/*!50001 SET character_set_client = utf8 */;
|
||||||
|
/*!50001 SET character_set_results = utf8 */;
|
||||||
|
/*!50001 SET collation_connection = utf8_general_ci */;
|
||||||
|
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||||
|
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
|
||||||
|
/*!50001 VIEW `primera_captura_full` AS (select `t1`.`fecha_captura` AS `fecha_captura`,`t1`.`referencia` AS `referencia`,`t1`.`precio` AS `precio`,`t1`.`tamano_categorico` AS `tamano_categorico`,`t1`.`tipo_anuncio` AS `tipo_anuncio`,`t1`.`calle` AS `calle`,`t1`.`barrio` AS `barrio`,`t1`.`distrito` AS `distrito`,`t1`.`ciudad` AS `ciudad`,`t1`.`latitud` AS `latitud`,`t1`.`longitud` AS `longitud`,`t1`.`cubierta` AS `cubierta`,`t1`.`puerta_auto` AS `puerta_auto`,`t1`.`ascensor` AS `ascensor`,`t1`.`alarma` AS `alarma`,`t1`.`circuito` AS `circuito`,`t1`.`personal` AS `personal`,`t1`.`telefono` AS `telefono`,`t1`.`precision` AS `precision` from `capturas` `t1` where (`t1`.`fecha_captura` = (select min(`t2`.`fecha_captura`) from `capturas` `t2` where (`t1`.`referencia` = `t2`.`referencia`)))) */;
|
||||||
|
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||||
|
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||||
|
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Final view structure for view `ultima_captura`
|
||||||
|
--
|
||||||
|
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `ultima_captura`*/;
|
||||||
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
|
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||||
|
/*!50001 SET character_set_client = utf8 */;
|
||||||
|
/*!50001 SET character_set_results = utf8 */;
|
||||||
|
/*!50001 SET collation_connection = utf8_general_ci */;
|
||||||
|
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||||
|
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
|
||||||
|
/*!50001 VIEW `ultima_captura` AS (select `t1`.`fecha_captura` AS `fecha_captura`,`t1`.`referencia` AS `referencia`,`t1`.`precio` AS `precio`,`t1`.`tamano_categorico` AS `tamano_categorico`,`t1`.`tipo_anuncio` AS `tipo_anuncio`,`t1`.`calle` AS `calle`,`t1`.`barrio` AS `barrio`,`t1`.`distrito` AS `distrito`,`t1`.`ciudad` AS `ciudad`,`t1`.`latitud` AS `latitud`,`t1`.`longitud` AS `longitud`,`t1`.`cubierta` AS `cubierta`,`t1`.`puerta_auto` AS `puerta_auto`,`t1`.`ascensor` AS `ascensor`,`t1`.`alarma` AS `alarma`,`t1`.`circuito` AS `circuito`,`t1`.`personal` AS `personal`,`t1`.`telefono` AS `telefono`,`t1`.`precision` AS `precision` from `capturas` `t1` where ((`t1`.`fecha_captura` = (select max(`t2`.`fecha_captura`) from `capturas` `t2` where (`t1`.`referencia` = `t2`.`referencia`))) and (`t1`.`fecha_captura` > (now() - interval 90 day)))) */;
|
||||||
|
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||||
|
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||||
|
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Final view structure for view `ultima_captura_full`
|
||||||
|
--
|
||||||
|
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `ultima_captura_full`*/;
|
||||||
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
|
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||||
|
/*!50001 SET character_set_client = utf8 */;
|
||||||
|
/*!50001 SET character_set_results = utf8 */;
|
||||||
|
/*!50001 SET collation_connection = utf8_general_ci */;
|
||||||
|
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||||
|
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
|
||||||
|
/*!50001 VIEW `ultima_captura_full` AS (select `t1`.`fecha_captura` AS `fecha_captura`,`t1`.`referencia` AS `referencia`,`t1`.`precio` AS `precio`,`t1`.`tamano_categorico` AS `tamano_categorico`,`t1`.`tipo_anuncio` AS `tipo_anuncio`,`t1`.`calle` AS `calle`,`t1`.`barrio` AS `barrio`,`t1`.`distrito` AS `distrito`,`t1`.`ciudad` AS `ciudad`,`t1`.`latitud` AS `latitud`,`t1`.`longitud` AS `longitud`,`t1`.`cubierta` AS `cubierta`,`t1`.`puerta_auto` AS `puerta_auto`,`t1`.`ascensor` AS `ascensor`,`t1`.`alarma` AS `alarma`,`t1`.`circuito` AS `circuito`,`t1`.`personal` AS `personal`,`t1`.`telefono` AS `telefono`,`t1`.`precision` AS `precision` from `capturas` `t1` where (`t1`.`fecha_captura` = (select max(`t2`.`fecha_captura`) from `capturas` `t2` where (`t1`.`referencia` = `t2`.`referencia`)))) */;
|
||||||
|
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||||
|
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||||
|
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Final view structure for view `vecinos_con_datos`
|
||||||
|
--
|
||||||
|
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `vecinos_con_datos`*/;
|
||||||
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
|
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||||
|
/*!50001 SET character_set_client = utf8 */;
|
||||||
|
/*!50001 SET character_set_results = utf8 */;
|
||||||
|
/*!50001 SET collation_connection = utf8_general_ci */;
|
||||||
|
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||||
|
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
|
||||||
|
/*!50001 VIEW `vecinos_con_datos` AS (select `v`.`referencia` AS `referencia_central`,`v`.`ranking` AS `ranking`,`c`.`fecha_captura` AS `fecha_captura`,`c`.`referencia` AS `referencia`,`c`.`precio` AS `precio`,`c`.`tamano_categorico` AS `tamano_categorico`,`c`.`tipo_anuncio` AS `tipo_anuncio`,`c`.`calle` AS `calle`,`c`.`barrio` AS `barrio`,`c`.`distrito` AS `distrito`,`c`.`ciudad` AS `ciudad`,`c`.`latitud` AS `latitud`,`c`.`longitud` AS `longitud`,`c`.`cubierta` AS `cubierta`,`c`.`puerta_auto` AS `puerta_auto`,`c`.`ascensor` AS `ascensor`,`c`.`alarma` AS `alarma`,`c`.`circuito` AS `circuito`,`c`.`personal` AS `personal`,`c`.`telefono` AS `telefono`,`c`.`precision` AS `precision` from (`vecinos` `v` join `ultima_captura_full` `c` on((`v`.`referencia_vecino` = `c`.`referencia`)))) */;
|
||||||
|
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||||
|
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||||
|
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Final view structure for view `venta_altacalidad`
|
||||||
|
--
|
||||||
|
|
||||||
|
/*!50001 DROP VIEW IF EXISTS `venta_altacalidad`*/;
|
||||||
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
|
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||||
|
/*!50001 SET character_set_client = utf8 */;
|
||||||
|
/*!50001 SET character_set_results = utf8 */;
|
||||||
|
/*!50001 SET collation_connection = utf8_general_ci */;
|
||||||
|
/*!50001 CREATE ALGORITHM=UNDEFINED */
|
||||||
|
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
|
||||||
|
/*!50001 VIEW `venta_altacalidad` AS (select `ultima_captura`.`fecha_captura` AS `fecha_captura`,`ultima_captura`.`referencia` AS `referencia`,`ultima_captura`.`precio` AS `precio`,`ultima_captura`.`tamano_categorico` AS `tamano_categorico`,`ultima_captura`.`tipo_anuncio` AS `tipo_anuncio`,`ultima_captura`.`calle` AS `calle`,`ultima_captura`.`barrio` AS `barrio`,`ultima_captura`.`distrito` AS `distrito`,`ultima_captura`.`ciudad` AS `ciudad`,`ultima_captura`.`latitud` AS `latitud`,`ultima_captura`.`longitud` AS `longitud`,`ultima_captura`.`cubierta` AS `cubierta`,`ultima_captura`.`puerta_auto` AS `puerta_auto`,`ultima_captura`.`ascensor` AS `ascensor`,`ultima_captura`.`alarma` AS `alarma`,`ultima_captura`.`circuito` AS `circuito`,`ultima_captura`.`personal` AS `personal`,`ultima_captura`.`telefono` AS `telefono`,`ultima_captura`.`precision` AS `precision` from `ultima_captura` where ((`ultima_captura`.`precision` = 'ROOFTOP') and (`ultima_captura`.`tamano_categorico` <> '2 coches o más') and (`ultima_captura`.`tamano_categorico` <> '') and (`ultima_captura`.`tipo_anuncio` = 1))) */;
|
||||||
|
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||||
|
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||||
|
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||||
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||||
|
|
||||||
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||||
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||||
|
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||||
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||||
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||||
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||||
|
|
||||||
|
-- Dump completed on 2018-10-28 19:47:03
|
||||||
4
db_layer/db_init_scripts/2_users.sql
Normal file
4
db_layer/db_init_scripts/2_users.sql
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
CREATE USER 'drogon'@'%' IDENTIFIED BY 'noesfacilvivirsindrogon';
|
||||||
|
GRANT ALL PRIVILEGES ON anuncios.* TO 'drogon'@'%';
|
||||||
|
GRANT ALL PRIVILEGES ON tasks.* TO 'drogon'@'%';
|
||||||
|
FLUSH PRIVILEGES
|
||||||
34
deployer.sh
34
deployer.sh
|
|
@ -3,6 +3,10 @@
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
### Variables de entorno ###
|
### Variables de entorno ###
|
||||||
|
echo "DROGON_ENV=tst" >> /etc/profile.d/drogon_variables
|
||||||
|
echo "DB_SERVICE_NAME=tst_drogon_db" >> /etc/profile.d/drogon_variables
|
||||||
|
echo "NETWORK_NAME=tst_drogon_network" >> /etc/profile.d/drogon_variables
|
||||||
|
DROGON_ENV=tst
|
||||||
DB_SERVICE_NAME=tst_drogon_db
|
DB_SERVICE_NAME=tst_drogon_db
|
||||||
NETWORK_NAME=tst_drogon_network
|
NETWORK_NAME=tst_drogon_network
|
||||||
|
|
||||||
|
|
@ -68,16 +72,34 @@ sleep 10s
|
||||||
|
|
||||||
################# Servicios
|
################# Servicios
|
||||||
|
|
||||||
# Instalar requerirements
|
#Instalar dependencias
|
||||||
cd ..
|
cd ..
|
||||||
pip3 install -r requirements.txt
|
pip3 install requirements.txt
|
||||||
|
|
||||||
#Explorer
|
#Explorer
|
||||||
|
cd ./explorer/
|
||||||
|
python3 explorer.py >> explorer_log.log 2>&1 &
|
||||||
|
|
||||||
#Refresher
|
# Respiro
|
||||||
|
sleep 10s
|
||||||
|
|
||||||
#Capturer
|
#Refresher
|
||||||
|
cd ./refresher/
|
||||||
|
python3 refresher.py >> refresher_log.log 2>&1 &
|
||||||
|
|
||||||
#Geocoder
|
# Respiro
|
||||||
|
sleep 10s
|
||||||
|
|
||||||
|
|
||||||
|
#Capturer
|
||||||
|
cd ./capturer/
|
||||||
|
python3 capturer.py >> capturer_log.log 2>&1 &
|
||||||
|
|
||||||
|
# Respiro
|
||||||
|
sleep 10s
|
||||||
|
|
||||||
|
|
||||||
|
#Geocoder
|
||||||
|
cd ./geocoder/
|
||||||
|
python3 geocoder.py >> geocoder_log.log 2>&1 &
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ from bs4 import BeautifulSoup
|
||||||
import re
|
import re
|
||||||
from random import randint
|
from random import randint
|
||||||
from core.mysql_wrapper import get_anunciosdb, get_tasksdb
|
from core.mysql_wrapper import get_anunciosdb, get_tasksdb
|
||||||
|
from core.config import monthly_new_ads_target, working_hours
|
||||||
from core.scrapping_utils import UrlAttack
|
from core.scrapping_utils import UrlAttack
|
||||||
from core.alerts import alert_master
|
from core.alerts import alert_master
|
||||||
from db_layer.capturing_tasks_interface import capturing_interface
|
from db_layer.capturing_tasks_interface import capturing_interface
|
||||||
|
|
@ -16,9 +17,6 @@ class Explorer():
|
||||||
|
|
||||||
sleep_time_no_work = 60
|
sleep_time_no_work = 60
|
||||||
sleep_time_no_service = 600
|
sleep_time_no_service = 600
|
||||||
working_hours = {'start': datetime.time(9, 0, 0),
|
|
||||||
'end': datetime.time(21, 0, 0)}
|
|
||||||
monthly_capture_target = 1000
|
|
||||||
ad_types = {'1': 'alquiler',
|
ad_types = {'1': 'alquiler',
|
||||||
'2': 'venta'}
|
'2': 'venta'}
|
||||||
|
|
||||||
|
|
@ -95,7 +93,7 @@ class Explorer():
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def in_working_hours(self):
|
def in_working_hours(self):
|
||||||
return Explorer.working_hours['start'] <= datetime.datetime.now().time() <= Explorer.working_hours['end']
|
return working_hours['start'] <= datetime.datetime.now().time() <= working_hours['end']
|
||||||
|
|
||||||
def get_referencias_acquired_today(self):
|
def get_referencias_acquired_today(self):
|
||||||
"""
|
"""
|
||||||
|
|
@ -123,8 +121,8 @@ class Explorer():
|
||||||
cursor_result = self.anunciosdb.query(query_statement)
|
cursor_result = self.anunciosdb.query(query_statement)
|
||||||
new_referencias_last_30 = cursor_result.fetchone()[0]
|
new_referencias_last_30 = cursor_result.fetchone()[0]
|
||||||
|
|
||||||
deviation = (Explorer.monthly_capture_target - new_referencias_last_30) / Explorer.monthly_capture_target
|
deviation = (monthly_new_ads_target - new_referencias_last_30) / monthly_new_ads_target
|
||||||
max_referencias = (Explorer.monthly_capture_target/30) * (1 + deviation)
|
max_referencias = (monthly_new_ads_target / 30) * (1 + deviation)
|
||||||
|
|
||||||
return max_referencias
|
return max_referencias
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ sys.path.append('..')
|
||||||
import requests
|
import requests
|
||||||
from time import sleep
|
from time import sleep
|
||||||
from db_layer.capturas_interface import capturas_interface
|
from db_layer.capturas_interface import capturas_interface
|
||||||
|
from core.config import google_api_key
|
||||||
|
|
||||||
class Geocoder:
|
class Geocoder:
|
||||||
|
|
||||||
|
|
@ -127,7 +127,7 @@ class GeocodingTask:
|
||||||
def __init__(self, address):
|
def __init__(self, address):
|
||||||
self.request_parameters = {'address': address,
|
self.request_parameters = {'address': address,
|
||||||
'region': 'es',
|
'region': 'es',
|
||||||
'key': 'AIzaSyCnKj0WnsxVZcaoxeAYkuRw3cKRNGiISYA'}
|
'key': google_api_key}
|
||||||
self.tries = 0
|
self.tries = 0
|
||||||
|
|
||||||
def geocode(self):
|
def geocode(self):
|
||||||
|
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
bs4 == 4.6.3
|
|
||||||
mysql-connector = 2.1.6
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue