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:
@ -38,6 +38,7 @@ export default function Component({
|
|||||||
children,
|
children,
|
||||||
}: Props) {
|
}: Props) {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
console.log('setting OPENAPI.BASE to', apiUrl);
|
||||||
if (apiUrl) OpenAPI.BASE = apiUrl;
|
if (apiUrl) OpenAPI.BASE = apiUrl;
|
||||||
}, [apiUrl]);
|
}, [apiUrl]);
|
||||||
|
|
||||||
|
@ -29,23 +29,23 @@ import {
|
|||||||
} from 'services/thunks/session';
|
} from 'services/thunks/session';
|
||||||
import { OpenAPI } from 'services/api';
|
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 = () => {
|
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;
|
let areListenersSet = false;
|
||||||
|
|
||||||
const middleware: Middleware =
|
const middleware: Middleware =
|
||||||
|
Reference in New Issue
Block a user