|
Revision 3942, 0.8 kB
(checked in by hans, 2 months ago)
|
Merge from anon-transaction-fixes-2 branch. This changeset removes
make-object and initialize-persistent-instance, makes the allocation
of object IDs simpler and more safe and removes several relicts from
previous refactoring iterations. Also, the store tests have been
extended significantly to test pathological cases and create objects
from multiple threads.
|
| Line | |
|---|
| 1 |
(in-package :bos.web) |
|---|
| 2 |
|
|---|
| 3 |
(defun daily-cleanup () |
|---|
| 4 |
(format t "; performing daily cleanup run~%") |
|---|
| 5 |
(bos.m2::delete-expired-contracts) |
|---|
| 6 |
(format t "; snapshotting datastore~%") |
|---|
| 7 |
(snapshot) |
|---|
| 8 |
(format t "; running check (consistent-p)~%") |
|---|
| 9 |
(flet ((consistent-p-report () |
|---|
| 10 |
(let (consistent-p) |
|---|
| 11 |
(values (with-output-to-string (*error-output*) |
|---|
| 12 |
(setq consistent-p (bos.m2::consistent-p))) |
|---|
| 13 |
consistent-p)))) |
|---|
| 14 |
(multiple-value-bind (report consistent-p) |
|---|
| 15 |
(consistent-p-report) |
|---|
| 16 |
(unless consistent-p |
|---|
| 17 |
(bos.m2::send-system-mail :to "kilian.sprotte@gmail.com" |
|---|
| 18 |
:subject "(bos.m2::consistent-p) returned NIL" |
|---|
| 19 |
:text report)))) |
|---|
| 20 |
(format t "; done~%")) |
|---|