Erply Stockmann Integration
The sync needs to be enabled by connecting the Erply account to a SFTP endpoint. This is done using the UI accessible through public/index.php. Credentials are encrypted using encryption_key.
Azure Scheduler is setup to invoke public/runAutoScheduler.php. This script will go through all stored Erply accounts and add sync jobs to the queue (Azure Storage Queue).
Azure App Service will take care of running enough instances of workers located at wwwroot/App_Data/jobs/continuous/syncWorker/run.php (Azure specific location). The worker instances will take jobs from the queue and execute them using job specific handlers.
Worker is initialized with job handlers and exception handlers. There is single job handler as only single report is produced. If there is an exception during the handling of the job, then the exception is passed to one or more exception handlers which determine the actions taken.
The possible actions are:
- logging to account specific problem log
- logging to general error log and sending the error over email
- retying the job
- marking the job finished / canceled
- pausing the sync for this account