feat: 本地测试防止报错

This commit is contained in:
f18326186224 2024-06-18 17:11:54 +08:00
parent e946fd9b36
commit b685c562be
6 changed files with 27 additions and 16 deletions

View file

@ -3,3 +3,6 @@
ui/.angular ui/.angular
ui/node_modules ui/node_modules
/.idea/* /.idea/*
*.bak
*.dat
*.dir

View file

@ -1,9 +1,10 @@
name: build name: build
on: on:
push: workflow_dispatch:
branches: # push:
- 'master' # branches:
# - 'master'
jobs: jobs:
push_to_registries: push_to_registries:

View file

@ -2,8 +2,8 @@ name: update-yt-dlp
on: on:
workflow_dispatch: workflow_dispatch:
schedule: # schedule:
- cron: '0 0 * * *' # - cron: '0 0 * * *'
jobs: jobs:
update-yt-dlp : update-yt-dlp :

3
.gitignore vendored
View file

@ -48,3 +48,6 @@ Thumbs.db
__pycache__ __pycache__
.venv .venv
/.idea/* /.idea/*
*.bak
*.dat
*.dir

View file

@ -1,13 +1,12 @@
#!/usr/bin/env python3
# pylint: disable=no-member,method-hidden
import os
import sys
from aiohttp import web
import socketio
import logging
import json import json
import logging
import os
import pathlib import pathlib
import sys
import platform
import socketio
from aiohttp import web
from ytdl import DownloadQueueNotifier, DownloadQueue from ytdl import DownloadQueueNotifier, DownloadQueue
@ -238,4 +237,7 @@ app.on_response_prepare.append(on_prepare)
if __name__ == '__main__': if __name__ == '__main__':
logging.basicConfig(level=logging.DEBUG) logging.basicConfig(level=logging.DEBUG)
log.info(f"Listening on {config.HOST}:{config.PORT}") log.info(f"Listening on {config.HOST}:{config.PORT}")
web.run_app(app, host=config.HOST, port=int(config.PORT), reuse_port=True) if platform.system() == 'Windows':
web.run_app(app, host=config.HOST, port=int(config.PORT))
else:
web.run_app(app, host=config.HOST, port=int(config.PORT), reuse_port=True)

View file

@ -1,5 +1,7 @@
import { AppPage } from './app.po'; import {describe, it} from 'node:test';
import { browser, logging } from 'protractor'; import {AppPage} from './app.po';
// @ts-ignore
import {browser, logging} from 'protractor';
describe('workspace-project App', () => { describe('workspace-project App', () => {
let page: AppPage; let page: AppPage;