Skip to content

Commit

Permalink
Merge pull request #23 from nens/upload-logging
Browse files Browse the repository at this point in the history
added bro-demo env option in settings
  • Loading branch information
JJFlorian authored Apr 4, 2024
2 parents bebed60 + 912e81b commit a77bd37
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ class UploadTask(models.Model):
status = models.CharField(
max_length=20, choices=choices.STATUS_CHOICES, default="PENDING", blank=True
)
bro_id = models.CharField(max_length=500, blank=True, null=True)
log = models.TextField(blank=True)
bro_errors = models.TextField(blank=True)
progress = models.FloatField(blank=True, null=True)
bro_id = models.CharField(max_length=500, blank=True, null=True)

def __str__(self) -> str:
return f"{self.data_owner}: {self.registration_type} ({self.request_type})"
1 change: 1 addition & 0 deletions api/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def upload_bro_data_task(

# Update upload task instance
upload_task_instance.bro_id = bro_id
upload_task_instance.progess = 100.0
upload_task_instance.status = "COMPLETED"
upload_task_instance.log = "The upload was done successfully"
upload_task_instance.save()
Expand Down
14 changes: 10 additions & 4 deletions brostar_api/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,13 @@
# SENTRY_DSN will only be set on staging/production, btw.
sentry_sdk.init(dsn=SENTRY_DSN)

# BRO SETTINGS
BRO_UITGIFTE_SERVICE_URL = "https://publiek.broservices.nl"
BRONHOUDERSPORTAAL_URL = "https://acc.bronhouderportaal-bro.nl"
# BRONHOUDERSPORTAAL_URL = "https://www.bronhouderportaal-bro.nl"
# BRO SETTINGS:
BRO_DEMO_OMGEVING = True

if BRO_DEMO_OMGEVING:
BRO_UITGIFTE_SERVICE_URL = "https://int-publiek.broservices.nl"
BRONHOUDERSPORTAAL_URL = "https://demo.bronhouderportaal-bro.nl"
else:
BRO_UITGIFTE_SERVICE_URL = "https://publiek.broservices.nl"
BRONHOUDERSPORTAAL_URL = "https://bronhouderportaal-bro.nl"
# BRONHOUDERSPORTAAL_URL = "https://www.bronhouderportaal-bro.nl"

0 comments on commit a77bd37

Please sign in to comment.