Skip to content

Commit

Permalink
fix #40
Browse files Browse the repository at this point in the history
  • Loading branch information
lpofredc committed Sep 26, 2023
1 parent 15503d4 commit 0d22fe3
Show file tree
Hide file tree
Showing 6 changed files with 1,000 additions and 1,080 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ test: # non-functional
# done
# @echo "Database Ready for connections!"
# docker logs dbtestgn2pg | grep "database system is ready to accept connections"
poetry install
poetry run pytest --user=${GEONATURE_USER} --password=${GEONATURE_PASSWORD} --url=${GEONATURE_URL} --db-user=dbuser --db-password=dbpass --db-port=5234 --export-id=${GEONATURE_EXPORT_ID} --nb-threads=${GEONATURE_NB_THREADS} tests
4 changes: 3 additions & 1 deletion gn2pg/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ def __init__(
)

except Exception as error:
logger.critical("Session failed (%s)", error)
logger.critical(
"Session failed (%s), HTTP status code is %s", error, login.status_code
)
raise HTTPError(login.status_code) from error

#  Find exports api path
Expand Down
4 changes: 2 additions & 2 deletions gn2pg/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def delete(self, page: str, queue: Queue) -> None:
response = self.process_progress(page=page)

if response.get("total_len") > 0:
self._backend.store_data(self._backend.delete_data(response.get("items")))
self._backend.delete_data(response.get("items"))
queue.put(response)
else:
logger.info(
Expand Down Expand Up @@ -244,7 +244,7 @@ def update(self, since: Optional[str] = None, actions: Optional[list] = None) ->
deleted_pages = self._api_instance.page_list(
kind="log",
params={
"filter_d_up_meta_last_action_date": since,
"meta_last_action_date": f"gte:{since}",
"limit": self._config.max_page_length,
"last_action": "D",
},
Expand Down
2 changes: 1 addition & 1 deletion gn2pg/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
PACKAGE = "gn2pg_client"
PROJECT = "GeoNature 2 PostgreSQL Client application"
PROJECT_NO_SPACES = PROJECT.replace(" ", "")
VERSION = "1.3.1"
VERSION = "1.6.0"
DESCRIPTION = "Import tool from GeoNature to a PostgreSQL database through Export module API"
AUTHORS = [
"@lpofredc (LPOAuRA)",
Expand Down
Loading

0 comments on commit 0d22fe3

Please sign in to comment.