Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
EMUAFactory
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mayinghao
EMUAFactory
Commits
1630144b
Commit
1630144b
authored
Jun 23, 2025
by
mayinghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
整理代码
parent
2f04d179
Pipeline
#25
failed with stages
Changes
10
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
20 additions
and
96 deletions
+20
-96
__init__.py
__init__.py
+0
-0
login.cpython-38.pyc
__pycache__/login.cpython-38.pyc
+0
-0
res_rc.cpython-38.pyc
__pycache__/res_rc.cpython-38.pyc
+0
-0
main.py
main.py
+2
-40
config.cpython-38.pyc
multipleThread/__pycache__/config.cpython-38.pyc
+0
-0
thread_resume.cpython-38.pyc
multipleThread/__pycache__/thread_resume.cpython-38.pyc
+0
-0
thread_upload.cpython-38.pyc
multipleThread/__pycache__/thread_upload.cpython-38.pyc
+0
-0
config.py
multipleThread/config.py
+14
-0
thread_resume.py
multipleThread/thread_resume.py
+2
-23
thread_upload.py
multipleThread/thread_upload.py
+2
-33
No files found.
__init__.py
0 → 100644
View file @
1630144b
__pycache__/login.cpython-38.pyc
0 → 100644
View file @
1630144b
File added
__pycache__/res_rc.cpython-38.pyc
0 → 100644
View file @
1630144b
File added
main.py
View file @
1630144b
...
@@ -17,21 +17,19 @@ from PyQt5.QtWidgets import QComboBox
...
@@ -17,21 +17,19 @@ from PyQt5.QtWidgets import QComboBox
import
sys
import
sys
from
PyQt5.QtWidgets
import
(
QApplication
,
QMainWindow
,
QTableView
,
QVBoxLayout
,
from
PyQt5.QtWidgets
import
(
QApplication
,
QMainWindow
,
QTableView
,
QVBoxLayout
,
QWidget
,
QPushButton
,
QHeaderView
,
QHBoxLayout
,
QWidget
,
QPushButton
,
QHeaderView
,
QHBoxLayout
,
QDialog
,
QLabel
,
QLineEdit
,
QFormLayout
,
QFileDialog
)
QLabel
,
QFileDialog
)
from
PyQt5.QtCore
import
Qt
,
QAbstractTableModel
,
QModelIndex
,
QThread
from
PyQt5.QtCore
import
Qt
,
QAbstractTableModel
,
QModelIndex
,
QThread
from
PyQt5.QtGui
import
QColor
from
PyQt5.QtGui
import
QColor
from
PyQt5.QtWidgets
import
QRadioButton
from
PyQt5.QtGui
import
QValidator
,
QRegExpValidator
from
PyQt5.QtGui
import
QValidator
,
QRegExpValidator
from
PyQt5.QtCore
import
QRegExp
from
PyQt5.QtCore
import
QRegExp
from
multipleThread.thread_upload
import
Upload_Thread
from
multipleThread.thread_upload
import
Upload_Thread
from
multipleThread.thread_resume
import
Resume_Thread
from
multipleThread.thread_resume
import
Resume_Thread
from
multipleThread.config
import
*
# 命令行查看文件md5
# 命令行查看文件md5
# certutil -hashfile music.mp4 MD5
# certutil -hashfile music.mp4 MD5
# 上传文件固定参数
# 上传文件固定参数
name_prefix
=
"https://qgongye.oss-cn-shanghai.aliyuncs.com
\\
upload/order"
# 当前用户
# 当前用户
user_now
=
''
user_now
=
''
...
@@ -43,48 +41,12 @@ order_info_url = "https://uat.emku.laidecloud.com/console/productOrder/experimen
...
@@ -43,48 +41,12 @@ order_info_url = "https://uat.emku.laidecloud.com/console/productOrder/experimen
# order detail
# order detail
order_detail_url
=
"https://uat.emku.laidecloud.com/console/productOrder/uploadorderdetail.ajax"
order_detail_url
=
"https://uat.emku.laidecloud.com/console/productOrder/uploadorderdetail.ajax"
# 上传文件回调地址
callback_url
=
"https://uat.emku.laidecloud.com/console/productOrder/filePthSave.ajax"
# 切片上传大小
part_size
=
5
*
1024
*
1024
# 未完成任务列表
# 未完成任务列表
job_list
=
{}
job_list
=
{}
auth
=
oss2
.
Auth
(
"LTAI3qeEHR5SP2ph"
,
"zsV3FnjVgBDhaAm23J2vdAmMuX0YFY"
)
# 填写Bucket所在地域对应的Endpoint。以华东1(上海)为例,Endpoint填写为https://oss-cn-hangzhou.aliyuncs.com。
endpoint
=
"https://oss-cn-shanghai.aliyuncs.com"
# 填写Endpoint对应的Region信息,例如cn-hangzhou。注意,v4签名下,必须填写该参数
region
=
"cn-shanghai"
bucket_name
=
"qgongye"
# yourBucketName填写存储空间名称。
bucket
=
oss2
.
Bucket
(
auth
,
endpoint
,
bucket_name
,
region
=
region
)
# 未完成上传的json文件存储路径,json命名格式为:tmp_{key}.json,比如key="music.mp3"
# 未完成上传的json文件存储路径,json命名格式为:tmp_{key}.json,比如key="music.mp3"
uncomplete_json_folder
=
"./upload_tag"
uncomplete_json_folder
=
"./upload_tag"
# 验证版本输入必须为数字
class
NumberValidator
(
QRegExpValidator
):
def
__init__
(
self
,
parent
=
None
):
# 匹配整数、浮点数(包括科学计数法)
reg_exp
=
QRegExp
(
r'^[+-]?(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?$'
)
super
()
.
__init__
(
reg_exp
,
parent
)
def
validate
(
self
,
text
,
pos
):
# 允许空输入
if
not
text
:
return
(
QValidator
.
Intermediate
,
text
,
pos
)
# 检查是否为纯数字
if
text
in
[
'+'
,
'-'
,
'.'
,
'+.'
,
'-.'
]:
return
(
QValidator
.
Intermediate
,
text
,
pos
)
return
super
()
.
validate
(
text
,
pos
)
# 全局线程书
# 全局线程书
thread_index
=
0
thread_index
=
0
...
...
multipleThread/__pycache__/config.cpython-38.pyc
0 → 100644
View file @
1630144b
File added
multipleThread/__pycache__/thread_resume.cpython-38.pyc
0 → 100644
View file @
1630144b
File added
multipleThread/__pycache__/thread_upload.cpython-38.pyc
0 → 100644
View file @
1630144b
File added
multipleThread/config.py
0 → 100644
View file @
1630144b
import
oss2
aliyun_key
=
"LTAI3qeEHR5SP2ph"
aliyun_secret
=
"zsV3FnjVgBDhaAm23J2vdAmMuX0YFY"
auth
=
oss2
.
Auth
(
aliyun_key
,
aliyun_secret
)
endpoint
=
"https://oss-cn-shanghai.aliyuncs.com"
region
=
"cn-shanghai"
bucket
=
oss2
.
Bucket
(
auth
,
endpoint
,
"qgongye"
,
region
=
region
)
# 分片大小
part_size
=
5
*
1024
*
1024
# 阿里云前缀
name_prefix
=
"https://qgongye.oss-cn-shanghai.aliyuncs.com
\\
upload/order"
# 回调地址
callback_url
=
"https://uat.emku.laidecloud.com/console/productOrder/filePthSave.ajax"
\ No newline at end of file
multipleThread/thread_resume.py
View file @
1630144b
...
@@ -2,32 +2,11 @@
...
@@ -2,32 +2,11 @@
import
time
import
time
import
requests
import
requests
from
PyQt5.QtCore
import
QThread
,
pyqtSignal
,
QWaitCondition
,
QMutex
,
QObject
,
pyqtSlot
from
PyQt5.QtCore
import
pyqtSignal
,
QWaitCondition
,
QMutex
,
QObject
,
pyqtSlot
import
os.path
import
os.path
from
PyQt5.QtWidgets
import
QApplication
,
QMainWindow
from
.config
import
*
import
sys
import
oss2
import
json
from
oss2
import
SizedFileAdapter
,
determine_part_size
import
time
import
alibabacloud_oss_v2
as
oss
import
uuid
from
oss2.models
import
PartInfo
from
oss2.models
import
PartInfo
# 切片上传大小
# 切片上传大小
part_size
=
5
*
1024
*
1024
name_prefix
=
"https://qgongye.oss-cn-shanghai.aliyuncs.com
\\
upload/order"
callback_url
=
"https://uat.emku.laidecloud.com/console/productOrder/filePthSave.ajax"
# 未完成任务列表
auth
=
oss2
.
Auth
(
"LTAI3qeEHR5SP2ph"
,
"zsV3FnjVgBDhaAm23J2vdAmMuX0YFY"
)
# 填写Bucket所在地域对应的Endpoint。以华东1(上海)为例,Endpoint填写为https://oss-cn-hangzhou.aliyuncs.com。
endpoint
=
"https://oss-cn-shanghai.aliyuncs.com"
# 填写Endpoint对应的Region信息,例如cn-hangzhou。注意,v4签名下,必须填写该参数
region
=
"cn-shanghai"
# yourBucketName填写存储空间名称。
bucket
=
oss2
.
Bucket
(
auth
,
endpoint
,
"qgongye"
,
region
=
region
)
# 未完成任务类
# 未完成任务类
...
...
multipleThread/thread_upload.py
View file @
1630144b
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
import
time
import
requests
import
requests
from
PyQt5.QtCore
import
QThread
,
pyqtSignal
,
QWaitCondition
,
QMutex
,
QObject
,
pyqtSlot
from
PyQt5.QtCore
import
QThread
,
pyqtSignal
,
QWaitCondition
,
QMutex
,
QObject
,
pyqtSlot
import
os.path
import
os.path
from
PyQt5.QtWidgets
import
QApplication
,
QMainWindow
import
sys
import
oss2
import
json
import
json
from
oss2
import
SizedFileAdapter
,
determine_part_size
from
oss2
import
SizedFileAdapter
import
uuid
import
uuid
import
alibabacloud_oss_v2
as
oss
from
oss2.credentials
import
EnvironmentVariableCredentialsProvider
from
oss2.models
import
PartInfo
from
oss2.models
import
PartInfo
# 切片上传大小
from
.config
import
*
part_size
=
5
*
1024
*
1024
name_prefix
=
"https://qgongye.oss-cn-shanghai.aliyuncs.com
\\
upload/order"
callback_url
=
"https://uat.emku.laidecloud.com/console/productOrder/filePthSave.ajax"
# 未完成任务列表
job_list
=
{}
auth
=
oss2
.
Auth
(
"LTAI3qeEHR5SP2ph"
,
"zsV3FnjVgBDhaAm23J2vdAmMuX0YFY"
)
# 填写Bucket所在地域对应的Endpoint。以华东1(上海)为例,Endpoint填写为https://oss-cn-hangzhou.aliyuncs.com。
endpoint
=
"https://oss-cn-shanghai.aliyuncs.com"
# 填写Endpoint对应的Region信息,例如cn-hangzhou。注意,v4签名下,必须填写该参数
region
=
"cn-shanghai"
# yourBucketName填写存储空间名称。
bucket
=
oss2
.
Bucket
(
auth
,
endpoint
,
"qgongye"
,
region
=
region
)
# self.thread = QThread()
# self.upload = Upload_Thread()
# self.upload.filename = filename
# self.upload.moveToThread(self.thread)
# self.upload.updateSignal.connect(self.changeProcessbar)
# self.thread.started.connect(self.upload.run)
# self.thread.start()
# 定义一个线程类
# 定义一个线程类
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment