mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
add logging HELP
This commit is contained in:
parent
49f88046fa
commit
e2a5271612
@ -38,6 +38,7 @@ export default function Component({
|
||||
children,
|
||||
}: Props) {
|
||||
useEffect(() => {
|
||||
console.log('setting OPENAPI.BASE to', apiUrl);
|
||||
if (apiUrl) OpenAPI.BASE = apiUrl;
|
||||
}, [apiUrl]);
|
||||
|
||||
|
@ -29,23 +29,23 @@ import {
|
||||
} from 'services/thunks/session';
|
||||
import { OpenAPI } from 'services/api';
|
||||
|
||||
let socket_url = `ws://${window.location.host}`;
|
||||
|
||||
console.log('socket middleware file loaded');
|
||||
console.log('OPENAPI.BASE: ', OpenAPI.BASE);
|
||||
// if building in package mode, replace socket url with open api base url minus the http protocol
|
||||
if (OpenAPI.BASE) {
|
||||
console.log('inside statement to set URL');
|
||||
//eslint-disable-next-line
|
||||
socket_url = OpenAPI.BASE.replace(/^https?\:\/\//i, '');
|
||||
}
|
||||
|
||||
const socket = io(socket_url, {
|
||||
timeout: 60000,
|
||||
path: '/ws/socket.io',
|
||||
});
|
||||
|
||||
export const socketMiddleware = () => {
|
||||
let socket_url = `ws://${window.location.host}`;
|
||||
|
||||
console.log('socket middleware file loaded');
|
||||
console.log('OPENAPI.BASE: ', OpenAPI.BASE);
|
||||
// if building in package mode, replace socket url with open api base url minus the http protocol
|
||||
if (OpenAPI.BASE) {
|
||||
console.log('inside statement to set URL');
|
||||
//eslint-disable-next-line
|
||||
socket_url = OpenAPI.BASE.replace(/^https?\:\/\//i, '');
|
||||
}
|
||||
|
||||
const socket = io(socket_url, {
|
||||
timeout: 60000,
|
||||
path: '/ws/socket.io',
|
||||
});
|
||||
|
||||
let areListenersSet = false;
|
||||
|
||||
const middleware: Middleware =
|
||||
|
Loading…
Reference in New Issue
Block a user