Release ForgeFlow 0.6.0
This commit is contained in:
@@ -107,7 +107,7 @@ app.whenReady().then(async () => {
|
||||
const repositories = new RepositoryService(store, git, gitea, diagnostics);
|
||||
const deployments = new DeploymentService(store, gitea, git, diagnostics);
|
||||
const ssh = new SshService({ store, diagnostics });
|
||||
const unraid = new UnraidDeploymentService({ store, ssh, git, diagnostics });
|
||||
const unraid = new UnraidDeploymentService({ store, ssh, git, diagnostics, sourcePath: app.getAppPath(), onOperationChange: (payload) => broadcast('operations:changed', payload) });
|
||||
const updates = new UpdateService({
|
||||
store,
|
||||
gitea,
|
||||
@@ -159,13 +159,14 @@ app.whenReady().then(async () => {
|
||||
if (operationTimer) clearTimeout(operationTimer);
|
||||
const intervalMs = Math.max(3, Number(store.data.preferences.operationPollSeconds) || 5) * 1000;
|
||||
operationTimer = setTimeout(async () => {
|
||||
if (store.data.setupComplete && store.getToken()) {
|
||||
if (store.data.setupComplete) {
|
||||
const active = store.data.operations.some((item) => item.type === 'deployment' && !['success', 'failed', 'cancelled', 'rolled-back'].includes(item.status));
|
||||
if (active) {
|
||||
const updated = await deployments.refreshActiveOperations().catch(async (error) => {
|
||||
await diagnostics.error('operation-monitor.failed', error);
|
||||
return [];
|
||||
});
|
||||
const [actions, sshOperations] = await Promise.all([
|
||||
store.getToken() ? deployments.refreshActiveOperations().catch(async (error) => { await diagnostics.error('operation-monitor.actions.failed', error); return []; }) : [],
|
||||
unraid.refreshActiveOperations().catch(async (error) => { await diagnostics.error('operation-monitor.unraid.failed', error); return []; })
|
||||
]);
|
||||
const updated = [...actions, ...sshOperations];
|
||||
if (updated.length) broadcast('operations:changed', { operations: updated });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user