Initial implementation.
Fix shutdown hang and add to test battery.
Assign correct db as "primary"
Merge remote branch 'upstream/master' into cylc6.viewable-db
Merge remote branch 'upstream/master' into cylc6.viewable-db
Back compat.
Handle exception raising.
Merge pull request #1173 from arjclark/cylc6.viewable-db

cylc 6 -  second db