-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async export excel 12.0 #333
Conversation
aa9cb21
to
ffcbd6b
Compare
self.config = config | ||
|
||
self._db_session_class = init_db_session_class(config) | ||
self._redis_connection = RedisClient(config).connection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
用到redis了吗
seafevent_server/__init__.py
Outdated
logger = logging.getLogger('seafevents') | ||
|
||
|
||
def get_sys_logs_task(tstart, tend, log_type): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这部分代码有用吗?把没有的删掉
seafevent_server/request_handler.py
Outdated
return make_response((error, 403)) | ||
|
||
if event_export_task_manager.tasks_queue.full(): | ||
logger.warning('seafile io server busy, queue size: %d, current tasks: %s, threads is_alive: %s' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改成 seafevent server busy, 这里没有seafile io server
seafevent_server/__init__.py
Outdated
from sqlalchemy import desc, select, update, func, text, and_ | ||
from sqlalchemy.sql import exists | ||
from .utils import write_xls, utc_to_local, generate_file_audit_event_type | ||
from .export_task_manager import event_export_task_manager |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改成从项目根目录导入吧
seafevent_server/__init__.py
Outdated
from .export_task_manager import event_export_task_manager | ||
from flask import make_response | ||
from seaserv import seafile_api, ccnet_api | ||
import os |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个放到最上面,按照顺放,系统包,第三方包,项目内部的包
4085029
to
ecc9b7d
Compare
seafevent_server/__init__.py
Outdated
import ast | ||
|
||
from sqlalchemy import desc, select, update, func, text, and_ | ||
from sqlalchemy.sql import exists |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是没用的吧,检查一下是不是还有其他没有的,都去掉
seafevent_server/__init__.py
Outdated
logger = logging.getLogger('seafevents') | ||
|
||
|
||
def query_status(task_id): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这下面的代码有用吗?
seafevent_server/__init__.py
Outdated
datetime.datetime.utcfromtimestamp(tend))) | ||
stmt = stmt.order_by(desc(obj.timestamp)) | ||
res = session.scalars(stmt).all() | ||
session.close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
参考下dtable-events 中的代码,看下是怎么关闭的
seafevent_server/request_handler.py
Outdated
event_export_task_manager.threads_is_alive())) | ||
return make_response(('seafevent server busy,.', 400)) | ||
|
||
tstart = request.args.get('start_time') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
类似这样参数名都改一下,
a878d55
to
c85df95
Compare
No description provided.