Skip to main content
Technical ManualLooking for step-by-step instructions? In the User Manual: Features and Settings

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​

ScopeWhereExample key
Every tenantThe host's appsettings.json, under OrchardCoreOrchardCore:CrestApps:Almohaseb:Jobs:MaxConcurrentJobsPerTenant
One tenantThe host's appsettings.json, under OrchardCore:{TenantName}OrchardCore:Contoso:CrestApps:Almohaseb:Jobs:MaxConcurrentJobsPerTenant
One tenantApp_Data/Sites/{TenantName}/appsettings.json, without the OrchardCore wrapperCrestApps:Almohaseb:Jobs:MaxConcurrentJobsPerTenant
Every tenantEnvironment 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

KeyDefaultWhat it does
MaxConcurrentJobsPerTenant2How many jobs one tenant runs at the same time.
MaxConcurrentJobsPerInstance8How 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.
SliceDuration00:02:00How long a job runs before it yields to other jobs.
LockExpiration00:10:00How long a job's lock lasts. Must be longer than a slice plus its longest batch.
StaleAfter00:12:00When a running job that stopped reporting is requeued from its last checkpoint.
RetryBaseDelay00:00:30The first delay before a failed batch is retried.
RetryMaxDelay00:30:00The longest delay between retries.
MemoryPressureDelay00:00:30How long a job waits when the process is under memory pressure.
ItemErrorLimit100How many item errors a job keeps.
Retention30.00:00:00How long finished jobs are kept before the sweeper deletes them.
SweepBatchSize100How 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.

KeyDefaultWhat it does
ClientIdThe client ID of the Plaid account (Plaid Dashboard > Developers > Keys).
SecretThe secret of the environment.
EnvironmentSandboxSandbox (test banks, user_good / pass_good) or Production.
BaseUrlThe address of the Plaid API, instead of the environment's.
ClientNameAl-MohasebThe name Plaid Link shows.
CountryCodesUSThe countries of the banks offered.
DaysRequested730The 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

KeyDefaultWhat it does
DatabaseShare0.25The share of database time background work may use, from 0.05 to 1. 1 turns pacing off.
MaxPause00:00:30The 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"
}
}
}