Skip to content

Commit

Permalink
🐛 Fix workstack numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
damm89 committed Oct 8, 2024
1 parent 701a1f0 commit 70cc9ba
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
4 changes: 2 additions & 2 deletions backend/src/zac/core/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ def _get_zaak(args):
client, zaak_url = args
return get_zaak(zaak_uuid=None, zaak_url=zaak_url, client=client)

with parallel(max_workers=10) as executor:
with parallel(max_workers=settings.MAX_WORKERS) as executor:
results = executor.map(_get_related_objects, clients)

job_args = []
Expand All @@ -532,7 +532,7 @@ def _get_zaak(args):
def _resolve_zaaktype(zaak):
zaak.zaaktype = fetch_zaaktype(zaak.zaaktype)

with parallel(max_workers=10) as executor:
with parallel(max_workers=settings.MAX_WORKERS) as executor:
for zaak in zaken:
executor.submit(_resolve_zaaktype, zaak)

Expand Down
4 changes: 3 additions & 1 deletion backend/src/zac/werkvoorraad/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
get_checklist_answers_groups,
)

from django.conf import settings

logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -408,7 +410,7 @@ def _count_access_requests():
_count_group_activities,
_count_access_requests,
]
with parallel(max_workers=10) as executor:
with parallel(max_workers=settings.MAX_WORKERS) as executor:
data = list(executor.map(lambda fn: fn(), fetch_these))

serializer = self.serializer_class({d["key"]: d["val"] for d in data})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h1>Werkvoorraad</h1>
type="badge"
color="primary"
class="ml-1">
{{summaryData?.zaken}}
<!-- {{summaryData?.zaken}} -->
</gu-chip>
</ng-template>
<!-- Content -->
Expand All @@ -30,7 +30,7 @@ <h1>Werkvoorraad</h1>
type="badge"
color="primary"
class="ml-1">
{{summaryData?.userTasks}}
<!-- {{summaryData?.userTasks}} -->
</gu-chip>
</ng-template>

Expand All @@ -50,7 +50,7 @@ <h1>Werkvoorraad</h1>
type="badge"
color="primary"
class="ml-1">
{{summaryData?.groupTasks}}
<!-- {{summaryData?.groupTasks}} -->
</gu-chip>
</ng-template>

Expand All @@ -67,11 +67,11 @@ <h1>Werkvoorraad</h1>
<!-- Label -->
<ng-template mat-tab-label>
Advies/akkoord
<gu-chip *ngIf="summaryData?.reviews"
<gu-chip *ngIf="summaryData?.reviews > 0"
type="badge"
color="primary"
class="ml-1">
{{summaryData?.reviews}}
<!-- {{summaryData?.reviews}} -->
</gu-chip>
</ng-template>

Expand All @@ -88,11 +88,11 @@ <h1>Werkvoorraad</h1>
<!-- Label -->
<ng-template mat-tab-label>
Activiteiten
<gu-chip *ngIf="summaryData?.userActivities"
<gu-chip *ngIf="summaryData?.userActivities > 0"
type="badge"
color="primary"
class="ml-1">
{{summaryData?.userActivities}}
<!-- {{summaryData?.userActivities}} -->
</gu-chip>
</ng-template>

Expand All @@ -112,11 +112,11 @@ <h1>Werkvoorraad</h1>
<!-- Label -->
<ng-template mat-tab-label>
Groepsactiviteiten
<gu-chip *ngIf="summaryData?.groupActivities"
<gu-chip *ngIf="summaryData?.groupActivities > 0"
type="badge"
color="primary"
class="ml-1">
{{summaryData?.groupActivities}}
<!-- {{summaryData?.groupActivities}} -->
</gu-chip>
</ng-template>

Expand All @@ -136,11 +136,11 @@ <h1>Werkvoorraad</h1>
<!-- Label -->
<ng-template mat-tab-label>
Toegangsverzoeken
<gu-chip *ngIf="summaryData?.accessRequests"
<gu-chip *ngIf="summaryData?.accessRequests > 0"
type="badge"
color="primary"
class="ml-1">
{{summaryData?.accessRequests}}
<!-- {{summaryData?.accessRequests}} -->
</gu-chip>
</ng-template>

Expand Down

0 comments on commit 70cc9ba

Please sign in to comment.