Skip to content

Commit

Permalink
ダウンロード時のログメッセージの修正 (#490)
Browse files Browse the repository at this point in the history
* pylitrcの修正

* ログの修正

* poetry update

* poetry update

* version up
  • Loading branch information
yuji38kwmt committed Jul 28, 2022
1 parent aa593de commit 2c25ae4
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 170 deletions.
2 changes: 1 addition & 1 deletion annofabapi/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.62.0"
__version__ = "0.62.1"
24 changes: 16 additions & 8 deletions annofabapi/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,10 @@ def download_annotation_archive(self, project_id: str, dest_path: Union[str, Pat
url = response.headers["Location"]
response2 = self.download(url, dest_path)
logger.info(
"SimpleアノテーションZIPファイルをダウンロードしました。 :: project_id='%s', Last-Modified='%s', file='%s'",
"SimpleアノテーションZIPファイルをダウンロードしました。 :: project_id='%s', Last-Modified='%s', Content-Length='%s', file='%s'",
project_id,
response2.headers.get("Last-Modified"),
response2.headers.get("Content-Length"),
dest_path,
)
return url
Expand Down Expand Up @@ -325,9 +326,10 @@ def download_full_annotation_archive(self, project_id: str, dest_path: Union[str
url = response.headers["Location"]
response2 = self.download(url, dest_path)
logger.info(
"FullアノテーションZIPファイルをダウンロードしました。 :: project_id='%s', Last-Modified='%s', file='%s'",
"FullアノテーションZIPファイルをダウンロードしました。 :: project_id='%s', Last-Modified='%s', Content-Length='%s', file='%s'",
project_id,
response2.headers.get("Last-Modified"),
response2.headers.get("Content-Length"),
dest_path,
)
return url
Expand Down Expand Up @@ -1610,9 +1612,10 @@ def download_project_inputs_url(self, project_id: str, dest_path: Union[str, Pat
url = content["url"]
response2 = self.download(url, dest_path)
logger.info(
"入力データ全件ファイルをダウンロードしました。 :: project_id='%s', Last-Modified='%s', file='%s'",
"入力データ全件ファイルをダウンロードしました。 :: project_id='%s', Last-Modified='%s', Content-Length='%s', file='%s'",
project_id,
response2.headers.get("Last-Modified"),
response2.headers.get("Content-Length"),
dest_path,
)
return url
Expand All @@ -1635,9 +1638,10 @@ def download_project_tasks_url(self, project_id: str, dest_path: Union[str, Path
url = content["url"]
response2 = self.download(url, dest_path)
logger.info(
"タスク全件ファイルをダウンロードしました。 :: project_id='%s', Last-Modified='%s', file='%s'",
"タスク全件ファイルをダウンロードしました。 :: project_id='%s', Last-Modified='%s', Content-Length='%s', file='%s'",
project_id,
response2.headers.get("Last-Modified"),
response2.headers.get("Content-Length"),
dest_path,
)
return url
Expand Down Expand Up @@ -1667,9 +1671,10 @@ def download_project_inspections_url(self, project_id: str, dest_path: Union[str
url = content["url"]
response2 = self.download(url, dest_path)
logger.info(
"検査コメント全件ファイルをダウンロードしました。 :: project_id='%s', Last-Modified='%s', file='%s'",
"検査コメント全件ファイルをダウンロードしました。 :: project_id='%s', Last-Modified='%s', Content-Length='%s', file='%s'",
project_id,
response2.headers.get("Last-Modified"),
response2.headers.get("Content-Length"),
dest_path,
)
return url
Expand All @@ -1691,9 +1696,10 @@ def download_project_comments_url(self, project_id: str, dest_path: Union[str, P
url = content["url"]
response = self.download(url, dest_path)
logger.info(
"コメント全件ファイルをダウンロードしました。 :: project_id='%s', Last-Modified='%s', file='%s'",
"コメント全件ファイルをダウンロードしました。 :: project_id='%s', Last-Modified='%s', Content-Length='%s', file='%s'",
project_id,
response.headers.get("Last-Modified"),
response.headers.get("Content-Length"),
dest_path,
)
return url
Expand All @@ -1716,9 +1722,10 @@ def download_project_task_history_events_url(self, project_id: str, dest_path: U
url = content["url"]
response2 = self.download(url, dest_path)
logger.info(
"タスク履歴イベント全件ファイルをダウンロードしました。 :: project_id='%s', Last-Modified='%s', file='%s'",
"タスク履歴イベント全件ファイルをダウンロードしました。 :: project_id='%s', Last-Modified='%s', Content-Length='%s', file='%s'",
project_id,
response2.headers.get("Last-Modified"),
response2.headers.get("Content-Length"),
dest_path,
)
return url
Expand All @@ -1741,9 +1748,10 @@ def download_project_task_histories_url(self, project_id: str, dest_path: Union[
url = content["url"]
response2 = self.download(url, dest_path)
logger.info(
"タスク履歴全件ファイルをダウンロードしました。 :: project_id='%s', Last-Modified='%s', file='%s'",
"タスク履歴全件ファイルをダウンロードしました。 :: project_id='%s', Last-Modified='%s', Content-Length='%s', file='%s'",
project_id,
response2.headers.get("Last-Modified"),
response2.headers.get("Content-Length"),
dest_path,
)
return url
Expand Down

0 comments on commit 2c25ae4

Please sign in to comment.