Configuration Reference
Al-Mohaseb reads its settings through Orchard Core's shell configuration, so every section can be set for the whole host or for one tenant. Settings that a person changes in the admin, such as the business profile, are site settings stored in the tenant's database and are not listed here; see Features and settings.
Where settings go
| Scope | Where | Example key |
|---|---|---|
| Every tenant | The host's appsettings.json, under OrchardCore | OrchardCore:CrestApps:Almohaseb:Jobs:MaxConcurrentJobsPerTenant |
| One tenant | The host's appsettings.json, under OrchardCore:{TenantName} | OrchardCore:Contoso:CrestApps:Almohaseb:Jobs:MaxConcurrentJobsPerTenant |
| One tenant | App_Data/Sites/{TenantName}/appsettings.json, without the OrchardCore wrapper | CrestApps:Almohaseb:Jobs:MaxConcurrentJobsPerTenant |
| Every tenant | Environment variables: replace each : with __ | OrchardCore__CrestApps__Almohaseb__Jobs__MaxConcurrentJobsPerTenant |
Time spans use hh:mm:ss or d.hh:mm:ss. A tenant reads its configuration when it starts, so restart the tenant (or the host) after a change.
Background jobs
Section: CrestApps:Almohaseb:Jobs · Feature: CrestApps.Almohaseb.Jobs · Page: Jobs
| Key | Default | What it does |
|---|---|---|
MaxConcurrentJobsPerTenant | 2 | How many jobs one tenant runs at the same time. |
MaxConcurrentJobsPerInstance | 8 | How many jobs one application instance runs at the same time, across all tenants. Fixed for the process by the first tenant that starts the dispatcher, so set it in the host configuration. |
SliceDuration | 00:02:00 | How long a job runs before it yields to other jobs. |
LockExpiration | 00:10:00 | How long a job's lock lasts. Must be longer than a slice plus its longest batch. |
StaleAfter | 00:12:00 | When a running job that stopped reporting is requeued from its last checkpoint. |
RetryBaseDelay | 00:00:30 | The first delay before a failed batch is retried. |
RetryMaxDelay | 00:30:00 | The longest delay between retries. |
MemoryPressureDelay | 00:00:30 | How long a job waits when the process is under memory pressure. |
ItemErrorLimit | 100 | How many item errors a job keeps. |
Retention | 30.00:00:00 | How long finished jobs are kept before the sweeper deletes them. |
SweepBatchSize | 100 | How many jobs the sweeper handles per pass. |
{
"OrchardCore": {
"CrestApps": {
"Almohaseb": {
"Jobs": {
"MaxConcurrentJobsPerTenant": 2,
"MaxConcurrentJobsPerInstance": 8,
"SliceDuration": "00:02:00",
"Retention": "30.00:00:00"
}
}
}
}
}
OrchardCore__CrestApps__Almohaseb__Jobs__MaxConcurrentJobsPerTenant=2
OrchardCore__CrestApps__Almohaseb__Jobs__Retention=30.00:00:00
The batch size, maximum attempts and memory budget of each job type are set in code when the type is registered, not in configuration. See Jobs.
Bank feeds
Section: CrestApps:Almohaseb:Plaid · Feature: CrestApps.Almohaseb.Banking.Plaid · Page: Banking
The platform's Plaid account, shared by every business (each keeps its own connections). Set it in the host configuration, never in a tenant: the secret belongs in an environment variable, user secrets or Key Vault, not in a file in the repository.
| Key | Default | What it does |
|---|---|---|
ClientId | The client ID of the Plaid account (Plaid Dashboard > Developers > Keys). | |
Secret | The secret of the environment. | |
Environment | Sandbox | Sandbox (test banks, user_good / pass_good) or Production. |
BaseUrl | The address of the Plaid API, instead of the environment's. | |
ClientName | Al-Mohaseb | The name Plaid Link shows. |
CountryCodes | US | The countries of the banks offered. |
DaysRequested | 730 | The days of history Plaid fetches when a bank is connected (1 to 730). |
As environment variables for every tenant: OrchardCore__CrestApps__Almohaseb__Plaid__ClientId, OrchardCore__CrestApps__Almohaseb__Plaid__Secret and OrchardCore__CrestApps__Almohaseb__Plaid__Environment.
Background work pacing
Section: CrestApps:BackgroundWork:Pacing · From: CrestApps Orchard Core, also read by CrestApps.Almohaseb.Jobs
| Key | Default | What it does |
|---|---|---|
DatabaseShare | 0.25 | The share of database time background work may use, from 0.05 to 1. 1 turns pacing off. |
MaxPause | 00:00:30 | The longest pause between two batches. |
OrchardCore__CrestApps__BackgroundWork__Pacing__DatabaseShare=0.5
Logging
The host logs through NLog (src/Startup/CrestApps.Almohaseb.Web/NLog.config). Log levels follow the standard Logging:LogLevel section; appsettings.Development.json raises the CrestApps category to Information.
{
"Logging": {
"LogLevel": {
"Default": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"CrestApps": "Information"
}
}
}