mirror of
https://github.com/garethgeorge/backrest.git
synced 2026-08-28 20:06:32 +00:00
working multihost operation history sync
This commit is contained in:
@@ -135,13 +135,17 @@ func (m *SqliteStore) init() error {
|
||||
if err := applySqliteMigrations(m, m.dbpool); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
highestID, highestModno, err := m.GetHighestOpIDAndModno(oplog.Query{}.SetOriginalInstanceKeyid(""))
|
||||
// highestOpID from all instances
|
||||
highestID, _, err := m.GetHighestOpIDAndModno(oplog.Query{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, highestModno, err := m.GetHighestOpIDAndModno(oplog.Query{}.SetOriginalInstanceKeyid(""))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
m.highestOpID.Store(highestID)
|
||||
m.highestModno.Store(highestModno)
|
||||
m.highestOpID.Store(highestID)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -351,7 +351,7 @@ const getSidenavItems = (
|
||||
},
|
||||
...configPlans.map((plan) => {
|
||||
const sel = create(OpSelectorSchema, {
|
||||
instanceId: config.instance,
|
||||
originalInstanceKeyid: "",
|
||||
planId: plan.id,
|
||||
repoGuid: reposById[plan.repo]?.guid,
|
||||
});
|
||||
@@ -535,10 +535,6 @@ const getSidenavItems = (
|
||||
const IconForResource = ({ selector }: { selector: OpSelector }) => {
|
||||
const [status, setStatus] = useState(OperationStatus.STATUS_UNKNOWN);
|
||||
useEffect(() => {
|
||||
if (!selector || !selector.instanceId || !selector.repoGuid) {
|
||||
return;
|
||||
}
|
||||
|
||||
const load = async () => {
|
||||
setStatus(await getStatusForSelector(selector));
|
||||
};
|
||||
|
||||
@@ -55,6 +55,7 @@ export const PlanView = ({ plan }: React.PropsWithChildren<{ plan: Plan }>) => {
|
||||
selector: {
|
||||
planId: plan.id,
|
||||
repoGuid: repo!.guid,
|
||||
originalInstanceKeyid: "",
|
||||
},
|
||||
onlyFailed: true,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user