fix: validation in automation task (#2094)
This commit is contained in:
parent
928ae775f4
commit
90276073cd
1 changed files with 29 additions and 27 deletions
|
|
@ -64,6 +64,7 @@ def archive_old_issues():
|
||||||
issues_to_update.append(issue)
|
issues_to_update.append(issue)
|
||||||
|
|
||||||
# Bulk Update the issues and log the activity
|
# Bulk Update the issues and log the activity
|
||||||
|
if issues_to_update:
|
||||||
updated_issues = Issue.objects.bulk_update(
|
updated_issues = Issue.objects.bulk_update(
|
||||||
issues_to_update, ["archived_at"], batch_size=100
|
issues_to_update, ["archived_at"], batch_size=100
|
||||||
)
|
)
|
||||||
|
|
@ -136,6 +137,7 @@ def close_old_issues():
|
||||||
issues_to_update.append(issue)
|
issues_to_update.append(issue)
|
||||||
|
|
||||||
# Bulk Update the issues and log the activity
|
# Bulk Update the issues and log the activity
|
||||||
|
if issues_to_update:
|
||||||
updated_issues = Issue.objects.bulk_update(issues_to_update, ["state"], batch_size=100)
|
updated_issues = Issue.objects.bulk_update(issues_to_update, ["state"], batch_size=100)
|
||||||
[
|
[
|
||||||
issue_activity.delay(
|
issue_activity.delay(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue