Pause, resume and limits
Stop and continue a run, recover from a failure, and know what Seed does not do.
Statuses
Queued → Running → Completed
↓ ↑
Paused / Failed| Status | Meaning |
|---|---|
| Queued | Created. Its domains have not set up yet, so it cannot be paused |
| Running | The workers are applying its days |
| Paused | Stopped at its next event by Pause, or by itself when the site's scheduler came back on |
| Failed | An event raised three times at the same cursor |
| Completed | Reached its To date. The Summary is filled |
Pause and resume
Press Pause on the form to stop a Running run at its next event. Press Resume to continue it. From the command line:
cardinal seed:resume -t HOST # the latest Paused or Failed run
cardinal seed:resume -t HOST SEED-00001A resumed run continues from its cursor, the last date and event applied. Each event commits together with the cursor or not at all, so the resumed run skips what it already wrote. A paused and resumed run writes the same records as one left alone.
If the site's scheduler comes back on mid-run, for example when the pause ran out, the run pauses itself with that as its error. Pause the scheduler again and resume.
After a failure
A Failed run resumes from the event that failed. The resume keeps the error as a Comment on the run and clears it.
A failure caused by the site's state, such as a document the app refuses, fails again at the same event until you fix that state.
A run that failed before its first event cannot be resumed, because its setup may already have committed and a resume could create the company twice. Start a new run.
What the run records
The Seed Run form shows where the run is and what it wrote.
| Field | Holds |
|---|---|
| Last Date, Last Event | The cursor: the simulated day and the last event applied on it |
| Last Tick | The last day whose scheduler tick ran. The indicator's "day 12 of 30" counts from it |
| Failures, Resumes | How many times the run failed and was resumed |
| Records | Records written per RecType |
| Users | The seeded users, each with the role they act in |
| Scheduler Errors | Scheduler entries that failed at a day's tick |
| Error | Why the run failed |
| Summary | Each domain's checks, once Completed. The Summary button shows them as a table |
Running again
The same parameters and --seed give the same records. To add more history to the same site, start a new run with --company NAME and a --from after the company's last activity.
A run cannot be undone. To start over, drop the site, or seed a new company.
Limits
- Use Seed only on demo, staging and training sites. Its records are invented and backdated.
- Seeded users cannot sign in unless the run was given a password.
- The site's own scheduler must stay paused for the whole run.
- HRMS leaves the latest synced day open for manual marking, so the run's last day keeps its absences unmarked until the site's own scheduler runs.
- With
--company NAME, the company's own open orders and unpaid invoices stay as they were. Its stock on hand and bank balance still count. - CRM mail is recorded, not sent.
- Beside ERP, CRM's ERP integration may refuse the CRM Products the
crmdomain inserts. That combination is untested.