Skip to content

Commit

Permalink
Merge pull request #29 from homenoc/develop
Browse files Browse the repository at this point in the history
[fix] Fixed task process.
  • Loading branch information
yoneyan authored Aug 14, 2023
2 parents 59cffef + a46b765 commit 84f0ad1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions jpnic_admin/resource/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def search_list(self):
# last_checked_atのみ更新
for date_update_info_only_list in date_update_info_only_lists:
date_update_info_only_list.last_checked_at = self.now
date_update_info_only_list.save()
AddrList.objects.bulk_update(date_update_info_only_lists, fields=["last_checked_at"])

# すべて更新済みの場合は、JPNICハンドルの更新処理を行う
if len(date_update_info_only_lists) != 0 and len(update_info_lists) == 0:
Expand Down Expand Up @@ -774,9 +774,10 @@ def update_latest_data(self, handles=None):
break
if not is_exists:
handle_update_lists.append(base_handle)

for handle in handles:
self.insert_jpnic_handle(handle)
else:
handle_update_lists = base_handle_lists
for handle_update in handle_update_lists:
handle_update.last_checked_at = self.now
handle_update.save()

self.insert_jpnic_handle(handles)
JPNICHandle.objects.bulk_update(handle_update_lists, fields=["last_checked_at"])

0 comments on commit 84f0ad1

Please sign in to comment.