mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Merge branch 'main' into enhance/update-dependencies
This commit is contained in:
commit
6b6d654f60
13
.github/workflows/mkdocs-material.yml
vendored
13
.github/workflows/mkdocs-material.yml
vendored
@ -2,8 +2,7 @@ name: mkdocs-material
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'main'
|
- 'refs/heads/v2.3'
|
||||||
- 'development'
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@ -12,6 +11,10 @@ jobs:
|
|||||||
mkdocs-material:
|
mkdocs-material:
|
||||||
if: github.event.pull_request.draft == false
|
if: github.event.pull_request.draft == false
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
REPO_URL: '${{ github.server_url }}/${{ github.repository }}'
|
||||||
|
REPO_NAME: '${{ github.repository }}'
|
||||||
|
SITE_URL: 'https://${{ github.repository_owner }}.github.io/InvokeAI'
|
||||||
steps:
|
steps:
|
||||||
- name: checkout sources
|
- name: checkout sources
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@ -22,11 +25,15 @@ jobs:
|
|||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
python-version: '3.10'
|
||||||
|
cache: pip
|
||||||
|
cache-dependency-path: pyproject.toml
|
||||||
|
|
||||||
- name: install requirements
|
- name: install requirements
|
||||||
|
env:
|
||||||
|
PIP_USE_PEP517: 1
|
||||||
run: |
|
run: |
|
||||||
python -m \
|
python -m \
|
||||||
pip install -r docs/requirements-mkdocs.txt
|
pip install ".[docs]"
|
||||||
|
|
||||||
- name: confirm buildability
|
- name: confirm buildability
|
||||||
run: |
|
run: |
|
||||||
|
@ -384,6 +384,13 @@ export const systemSlice = createSlice({
|
|||||||
state.statusTranslationKey = 'common.statusPreparing';
|
state.statusTranslationKey = 'common.statusPreparing';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
builder.addCase(sessionInvoked.rejected, (state, action) => {
|
||||||
|
const error = action.payload as string | undefined;
|
||||||
|
state.toastQueue.push(
|
||||||
|
makeToast({ title: error || t('toast.serverError'), status: 'error' })
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Session Canceled
|
* Session Canceled
|
||||||
*/
|
*/
|
||||||
|
@ -46,6 +46,8 @@ export const socketMiddleware = () => {
|
|||||||
// TODO: handle providing jwt to socket.io
|
// TODO: handle providing jwt to socket.io
|
||||||
socketOptions.auth = { token: OpenAPI.TOKEN };
|
socketOptions.auth = { token: OpenAPI.TOKEN };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
socketOptions.transports = ['websocket', 'polling'];
|
||||||
}
|
}
|
||||||
|
|
||||||
const socket: Socket<ServerToClientEvents, ClientToServerEvents> = io(
|
const socket: Socket<ServerToClientEvents, ClientToServerEvents> = io(
|
||||||
|
@ -22,6 +22,8 @@ import {
|
|||||||
} from 'services/thunks/gallery';
|
} from 'services/thunks/gallery';
|
||||||
import { receivedModels } from 'services/thunks/model';
|
import { receivedModels } from 'services/thunks/model';
|
||||||
import { receivedOpenAPISchema } from 'services/thunks/schema';
|
import { receivedOpenAPISchema } from 'services/thunks/schema';
|
||||||
|
import { makeToast } from '../../../features/system/hooks/useToastWatcher';
|
||||||
|
import { addToast } from '../../../features/system/store/systemSlice';
|
||||||
|
|
||||||
type SetEventListenersArg = {
|
type SetEventListenersArg = {
|
||||||
socket: Socket<ServerToClientEvents, ClientToServerEvents>;
|
socket: Socket<ServerToClientEvents, ClientToServerEvents>;
|
||||||
@ -78,6 +80,16 @@ export const setEventListeners = (arg: SetEventListenersArg) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
socket.on('connect_error', (error) => {
|
||||||
|
if (error && error.message) {
|
||||||
|
dispatch(
|
||||||
|
addToast(
|
||||||
|
makeToast({ title: error.message, status: 'error', duration: 10000 })
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disconnect
|
* Disconnect
|
||||||
*/
|
*/
|
||||||
|
@ -101,17 +101,24 @@ export const nodeAdded = createAppAsyncThunk(
|
|||||||
*/
|
*/
|
||||||
export const sessionInvoked = createAppAsyncThunk(
|
export const sessionInvoked = createAppAsyncThunk(
|
||||||
'api/sessionInvoked',
|
'api/sessionInvoked',
|
||||||
async (arg: { sessionId: string }, _thunkApi) => {
|
async (arg: { sessionId: string }, { rejectWithValue }) => {
|
||||||
const { sessionId } = arg;
|
const { sessionId } = arg;
|
||||||
|
|
||||||
const response = await SessionsService.invokeSession({
|
try {
|
||||||
sessionId,
|
const response = await SessionsService.invokeSession({
|
||||||
all: true,
|
sessionId,
|
||||||
});
|
all: true,
|
||||||
|
});
|
||||||
|
sessionLog.info({ arg, response }, `Session invoked (${sessionId})`);
|
||||||
|
|
||||||
sessionLog.info({ arg, response }, `Session invoked (${sessionId})`);
|
return response;
|
||||||
|
} catch (error) {
|
||||||
return response;
|
const err = error as any;
|
||||||
|
if (err.status === 403) {
|
||||||
|
return rejectWithValue(err.body.detail);
|
||||||
|
}
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user