Skip to content

Commit

Permalink
✨ Add configurable client timeout to config
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenbal committed Feb 13, 2024
1 parent d5ee808 commit 3719c33
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions openformsclient/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class ConfigurationAdmin(SingletonModelAdmin):
"fields": (
"api_root",
"api_token",
"client_timeout",
"status",
)
},
Expand Down
21 changes: 21 additions & 0 deletions openformsclient/migrations/0003_configuration_client_timeout.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 3.2.23 on 2024-02-13 08:57

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("openformsclient", "0002_alter_configuration_options"),
]

operations = [
migrations.AddField(
model_name="configuration",
name="client_timeout",
field=models.PositiveIntegerField(
default=5,
help_text="The timeout that is used for requests (in seconds)",
verbose_name="Client request timeout",
),
),
]
5 changes: 5 additions & 0 deletions openformsclient/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ class Configuration(SingletonModel):
"The Open Forms API token value. Example: 7ab84e80b3d68d52a5f9e1712e3d0eda27d21e58"
),
)
client_timeout = models.PositiveIntegerField(
_("Client request timeout"),
default=5,
help_text=_("The timeout that is used for requests (in seconds)"),
)

sdk_css_url = models.URLField(
_("SDK CSS URL"),
Expand Down

0 comments on commit 3719c33

Please sign in to comment.