Commit 1208f24
Ronald A Richardson
feat: schedule sandbox:sync to run hourly
Registers the sandbox:sync Artisan command in the CoreServiceProvider
scheduler so that production users and companies are periodically
mirrored into the sandbox database without any manual intervention.
Hourly cadence is chosen as a sensible default:
- New users/companies created in production become available in sandbox
within at most one hour, keeping the sandbox reasonably fresh.
- The command is lightweight (upserts only; no heavy data transforms) so
running it every hour does not impose meaningful DB load.
- withoutOverlapping() ensures a long-running sync cannot queue up
multiple concurrent instances if the scheduler fires while a previous
run is still in progress.
This complements the on-demand sync added to ApiCredentialController
(which handles the immediate FK-constraint case at key-creation time)
by ensuring the sandbox stays broadly consistent with production over
time for all other sandbox operations.1 parent e19c142 commit 1208f24
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
168 | 175 | | |
169 | 176 | | |
170 | 177 | | |
| |||
0 commit comments