Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
evm-store
Project overview
Project overview
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
wanli
evm-store
Commits
498128c0
Commit
498128c0
authored
Jul 15, 2021
by
wanli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat(models/package.py): package表增加打包算法字段
parent
f4194576
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
199 additions
and
82 deletions
+199
-82
tools/build_out/application/app.py
tools/build_out/application/app.py
+8
-2
tools/build_out/application/signal_manager.py
tools/build_out/application/signal_manager.py
+1
-1
tools/build_out/controllers/__init__.py
tools/build_out/controllers/__init__.py
+1
-1
tools/build_out/controllers/file.py
tools/build_out/controllers/file.py
+8
-20
tools/build_out/controllers/package.py
tools/build_out/controllers/package.py
+1
-1
tools/build_out/models/annex.py
tools/build_out/models/annex.py
+1
-1
tools/build_out/models/package.py
tools/build_out/models/package.py
+11
-16
tools/build_out/views/__init__.20210715165358.py
tools/build_out/views/__init__.20210715165358.py
+74
-0
tools/build_out/views/__init__.py
tools/build_out/views/__init__.py
+1
-18
tools/build_out/views/package.20210715165358.py
tools/build_out/views/package.20210715165358.py
+61
-0
tools/build_out/views/package.py
tools/build_out/views/package.py
+15
-12
tools/config.json
tools/config.json
+8
-8
tools/gen_code.py
tools/gen_code.py
+3
-2
tools/logs/running.log
tools/logs/running.log
+6
-0
No files found.
tools/build_out/application/app.py
View file @
498128c0
...
...
@@ -60,8 +60,14 @@ def _custom_abort(http_status_code, **kwargs):
自定义abort 400响应数据格式
"""
if
http_status_code
==
400
:
return
abort
(
jsonify
(
response_result
(
ResponseCode
.
HTTP_INVAILD_REQUEST
,
msg
=
kwargs
)))
message
=
kwargs
.
get
(
'msg'
)
if
isinstance
(
message
,
dict
):
param
,
info
=
list
(
message
.
items
())[
0
]
data
=
'{}:{}!'
.
format
(
param
,
info
)
return
abort
(
jsonify
(
response_result
(
ResponseCode
.
HTTP_INVAILD_REQUEST
,
data
=
data
)))
else
:
return
abort
(
jsonify
(
response_result
(
ResponseCode
.
HTTP_INVAILD_REQUEST
,
data
=
message
)))
# return { 'code': http_status_code, 'msg': kwargs.get('message') }
return
abort
(
http_status_code
)
def
_access_control
(
response
):
...
...
tools/build_out/application/signal_manager.py
View file @
498128c0
'''
Author: your name
Date: 2021-06-30 18:03:41
LastEditTime: 2021-07-15 1
0:23:56
LastEditTime: 2021-07-15 1
7:10:43
LastEditors: Please set LastEditors
Description: In User Settings Edit
FilePath:
\
evm-store
\t
ools
\b
uild_out
\a
pplication
\
signal_manager.py
...
...
tools/build_out/controllers/__init__.py
View file @
498128c0
'''
Author: your name
Date: 2021-06-30 17:43:46
LastEditTime: 2021-07-15 1
0:24:2
3
LastEditTime: 2021-07-15 1
7:10:3
3
LastEditors: Please set LastEditors
Description: In User Settings Edit
FilePath:
\
evm-store
\t
ools
\b
uild_out
\
controllers
\
__init__.py
...
...
tools/build_out/controllers/file.py
View file @
498128c0
...
...
@@ -55,7 +55,7 @@ class FileManager(object):
@param {*} self
@return {*}
'''
def
content
(
self
,
disk
,
target_path
=
""
):
def
content
(
self
,
disk
,
target_path
=
'/'
):
'''
目录信息结构体:
{
...
...
@@ -86,6 +86,7 @@ class FileManager(object):
}
'''
target_path
=
Path
(
target_path
)
result
=
{
"directories"
:
[],
"files"
:
[]
...
...
@@ -95,14 +96,7 @@ class FileManager(object):
if
not
disk_path
.
exists
():
return
result
if
target_path
==
None
:
target_path
=
""
if
target_path
.
startswith
(
"/"
):
target_path
=
target_path
[
1
:]
target_path
=
disk_path
.
joinpath
(
Path
(
target_path
))
target_path
=
disk_path
.
joinpath
(
target_path
)
if
not
target_path
.
exists
():
return
result
...
...
@@ -118,7 +112,7 @@ class FileManager(object):
else
:
result
[
"files"
]
.
append
({
"basename"
:
child
.
name
,
"dirname"
:
child
.
parent
.
relative_to
(
disk_path
)
.
as_posix
()
,
"dirname"
:
child
.
parent
,
"extension"
:
child
.
suffix
[
1
:],
"filename"
:
child
.
stem
,
"path"
:
child
.
resolve
()
.
relative_to
(
disk_path
)
.
as_posix
(),
...
...
@@ -127,14 +121,13 @@ class FileManager(object):
"type"
:
"file"
})
# pprint.pprint(result)
with
open
(
"result.json"
,
"w"
)
as
f
:
json
.
dump
(
result
,
f
)
f
.
seek
(
0
)
f
.
truncate
()
f
.
write
(
json
.
dumps
(
result
,
ensure_ascii
=
True
))
pprint
.
pprint
(
result
)
return
result
,
ResponseCode
.
HTTP_SUCCESS
'''
...
...
@@ -142,7 +135,7 @@ class FileManager(object):
@param {*} self
@return {*}
'''
def
tree
(
self
,
disk
,
target_path
=
""
):
def
tree
(
self
,
disk
,
target_path
=
"
/
"
):
'''
{
basename: "trees"
...
...
@@ -156,18 +149,13 @@ class FileManager(object):
}
'''
target_path
=
Path
(
target_path
)
result
=
[]
rp
=
Path
(
disk_root
)
disk_path
=
rp
/
disk
if
not
disk_path
.
exists
():
return
result
if
target_path
==
None
:
target_path
=
""
if
target_path
.
startswith
(
"/"
):
target_path
=
target_path
[
1
:]
temp_path
=
disk_path
.
joinpath
(
target_path
)
if
not
temp_path
.
exists
():
return
result
...
...
@@ -185,7 +173,7 @@ class FileManager(object):
"timestamp"
:
int
(
child
.
stat
()
.
st_mtime
),
"type"
:
"dir"
})
#
pprint.pprint(result)
pprint
.
pprint
(
result
)
return
result
,
ResponseCode
.
HTTP_SUCCESS
...
...
tools/build_out/controllers/package.py
View file @
498128c0
'''
Author: your name
Date: 2021-06-30 18:03:41
LastEditTime: 2021-07-15 1
0:39:5
2
LastEditTime: 2021-07-15 1
7:10:2
2
LastEditors: Please set LastEditors
Description: In User Settings Edit
FilePath:
\
evm-store
\t
ools
\b
uild_out
\
controllers
\
package.py
...
...
tools/build_out/models/annex.py
View file @
498128c0
'''
Author: your name
Date: 2021-07-15 09:33:39
LastEditTime: 2021-07-15 1
0:22:20
LastEditTime: 2021-07-15 1
7:10:06
LastEditors: Please set LastEditors
Description: In User Settings Edit
FilePath:
\
evm-store
\t
ools
\b
uild_out
\
models
\a
nnex.20210715101849.py
...
...
tools/build_out/models/package.py
View file @
498128c0
'''
Author: your name
Date: 2021-06-30 18:03:41
LastEditTime: 2021-07-15 10:22:39
LastEditors: Please set LastEditors
Description: In User Settings Edit
FilePath:
\
evm-store
\t
ools
\b
uild_out
\
models
\
package.py
'''
#!/usr/bin/env python
# -*- coding: utf_8 -*-
...
...
@@ -19,22 +11,24 @@ class PackageModel(PrimaryModel):
app
=
db
.
Column
(
db
.
Integer
,
nullable
=
False
)
app_version
=
db
.
Column
(
db
.
String
(
200
),
nullable
=
False
)
package_info
=
db
.
Column
(
db
.
String
(
20
),
nullable
=
False
)
file_path
=
db
.
Column
(
db
.
String
(
200
),
nullable
=
False
)
source
=
db
.
Column
(
db
.
Integer
,
nullable
=
False
)
user_agent
=
db
.
Column
(
db
.
String
(
200
),
nullable
=
False
)
download_url
=
db
.
Column
(
db
.
String
(
200
),
nullable
=
False
)
ip
=
db
.
Column
(
db
.
String
(
128
),
nullable
=
False
)
geo_location
=
db
.
Column
(
db
.
String
(
200
),
nullable
=
False
)
operator
=
db
.
Column
(
db
.
String
(
50
),
nullable
=
False
)
algorithm
=
db
.
Column
(
db
.
String
(
50
),
nullable
=
False
,
default
=
'zlib'
)
file_path
=
db
.
Column
(
db
.
String
(
200
),
nullable
=
False
,
default
=
''
)
source
=
db
.
Column
(
db
.
Integer
,
nullable
=
False
,
default
=
0
)
user_agent
=
db
.
Column
(
db
.
String
(
200
),
nullable
=
False
,
default
=
''
)
download_url
=
db
.
Column
(
db
.
String
(
200
),
nullable
=
False
,
default
=
''
)
ip
=
db
.
Column
(
db
.
String
(
128
),
nullable
=
False
,
default
=
'127.0.0.1'
)
geo_location
=
db
.
Column
(
db
.
String
(
200
),
nullable
=
False
,
default
=
''
)
operator
=
db
.
Column
(
db
.
String
(
50
),
nullable
=
False
,
default
=
''
)
# __table_args__ = (
# db.Index('idx_xxx', 'xxx', mysql_using='btree'),
# )
def
__init__
(
self
,
app
,
app_version
,
package_info
,
file_path
,
source
=
""
,
user_agent
=
""
,
download_url
=
""
,
ip
=
""
,
geo_location
=
""
,
operator
=
""
,
create_by
=
None
,
create_at
=
None
,
update_by
=
None
,
update_at
=
None
):
def
__init__
(
self
,
app
,
app_version
,
package_info
,
algorithm
=
'zlib'
,
file_path
=
''
,
source
=
0
,
user_agent
=
''
,
download_url
=
''
,
ip
=
'127.0.0.1'
,
geo_location
=
''
,
operator
=
''
,
create_by
=
None
,
create_at
=
None
,
update_by
=
None
,
update_at
=
None
):
self
.
app
=
app
self
.
app_version
=
app_version
self
.
package_info
=
package_info
self
.
algorithm
=
algorithm
self
.
file_path
=
file_path
self
.
source
=
source
self
.
user_agent
=
user_agent
...
...
@@ -54,6 +48,7 @@ class PackageModel(PrimaryModel):
return
{
'app_version'
:
self
.
app_version
,
'package_info'
:
self
.
package_info
,
'algorithm'
:
self
.
algorithm
,
'file_path'
:
self
.
file_path
,
'source'
:
self
.
source
,
'user_agent'
:
self
.
user_agent
,
...
...
tools/build_out/views/__init__.20210715165358.py
0 → 100644
View file @
498128c0
'''
Author: your name
Date: 2021-07-15 03:22:19
LastEditTime: 2021-07-15 10:20:28
LastEditors: Please set LastEditors
Description: In User Settings Edit
FilePath:
\
evm-store
\t
ools
\b
uild_out
\v
iews
\
__init__.py
'''
#!/usr/bin/env python
# -*- coding: utf_8 -*-
from
flask
import
Blueprint
from
flask_restful
import
Api
from
.
import
area
from
.
import
app
from
.
import
package
from
.
import
user
from
.
import
login
from
.
import
device
from
.
import
annex
from
.
import
file
from
.
import
monitorWatch
from
.
import
monitorSystem
from
.
import
monitorLvgl
from
.
import
monitorImage
from
.
import
monitorEvm
api_v1
=
Blueprint
(
'api_v1'
,
__name__
)
api
=
Api
(
api_v1
)
api
.
add_resource
(
area
.
AreaResource
,
'/area/<string:uuid>'
)
api
.
add_resource
(
area
.
AreaResourceList
,
'/area'
)
api
.
add_resource
(
app
.
AppResource
,
'/app/<string:uuid>'
)
api
.
add_resource
(
app
.
AppResourceList
,
'/app'
)
api
.
add_resource
(
package
.
PackageResource
,
'/package/<string:uuid>'
)
api
.
add_resource
(
package
.
PackageResourceList
,
'/package'
)
api
.
add_resource
(
user
.
UserResource
,
'/user/<string:uuid>'
)
api
.
add_resource
(
user
.
UserResourceList
,
'/user'
)
api
.
add_resource
(
login
.
LoginResource
,
'/login/<string:uuid>'
)
api
.
add_resource
(
login
.
LoginResourceList
,
'/login'
)
api
.
add_resource
(
device
.
DeviceResource
,
'/device/<string:uuid>'
)
api
.
add_resource
(
device
.
DeviceResourceList
,
'/device'
)
api
.
add_resource
(
annex
.
AnnexResource
,
'/annex/<string:uuid>'
)
api
.
add_resource
(
annex
.
AnnexResourceList
,
'/annex'
)
api
.
add_resource
(
file
.
FileInit
,
"/file-manager/initialize"
)
api
.
add_resource
(
file
.
FileContent
,
"/file-manager/content"
)
api
.
add_resource
(
file
.
FileDisk
,
"/file-manager/disk"
)
api
.
add_resource
(
file
.
FileTree
,
"/file-manager/tree"
)
api
.
add_resource
(
file
.
FileDownload
,
"/file-manager/download"
)
api
.
add_resource
(
file
.
FilePrview
,
"/file-manager/preview"
)
api
.
add_resource
(
monitorWatch
.
MonitorWatchResource
,
'/monitorWatch/<string:uuid>'
)
api
.
add_resource
(
monitorWatch
.
MonitorWatchResourceList
,
'/monitorWatch'
)
api
.
add_resource
(
monitorSystem
.
MonitorSystemResource
,
'/monitorSystem/<string:uuid>'
)
api
.
add_resource
(
monitorSystem
.
MonitorSystemResourceList
,
'/monitorSystem'
)
api
.
add_resource
(
monitorLvgl
.
MonitorLvglResource
,
'/monitorLvgl/<string:uuid>'
)
api
.
add_resource
(
monitorLvgl
.
MonitorLvglResourceList
,
'/monitorLvgl'
)
api
.
add_resource
(
monitorImage
.
MonitorImageResource
,
'/monitorImage/<string:uuid>'
)
api
.
add_resource
(
monitorImage
.
MonitorImageResourceList
,
'/monitorImage'
)
api
.
add_resource
(
monitorEvm
.
MonitorEvmResource
,
'/monitorEvm/<string:uuid>'
)
api
.
add_resource
(
monitorEvm
.
MonitorEvmResourceList
,
'/monitorEvm'
)
tools/build_out/views/__init__.py
View file @
498128c0
'''
Author: your name
Date: 2021-07-15 03:22:19
LastEditTime: 2021-07-15 10:20:28
LastEditors: Please set LastEditors
Description: In User Settings Edit
FilePath:
\
evm-store
\t
ools
\b
uild_out
\v
iews
\
__init__.py
'''
#!/usr/bin/env python
# -*- coding: utf_8 -*-
# -*- coding: utf-8 -*-
from
flask
import
Blueprint
from
flask_restful
import
Api
...
...
@@ -18,7 +9,6 @@ from . import user
from
.
import
login
from
.
import
device
from
.
import
annex
from
.
import
file
from
.
import
monitorWatch
from
.
import
monitorSystem
from
.
import
monitorLvgl
...
...
@@ -51,13 +41,6 @@ api.add_resource(device.DeviceResourceList, '/device')
api
.
add_resource
(
annex
.
AnnexResource
,
'/annex/<string:uuid>'
)
api
.
add_resource
(
annex
.
AnnexResourceList
,
'/annex'
)
api
.
add_resource
(
file
.
FileInit
,
"/file-manager/initialize"
)
api
.
add_resource
(
file
.
FileContent
,
"/file-manager/content"
)
api
.
add_resource
(
file
.
FileDisk
,
"/file-manager/disk"
)
api
.
add_resource
(
file
.
FileTree
,
"/file-manager/tree"
)
api
.
add_resource
(
file
.
FileDownload
,
"/file-manager/download"
)
api
.
add_resource
(
file
.
FilePrview
,
"/file-manager/preview"
)
api
.
add_resource
(
monitorWatch
.
MonitorWatchResource
,
'/monitorWatch/<string:uuid>'
)
api
.
add_resource
(
monitorWatch
.
MonitorWatchResourceList
,
'/monitorWatch'
)
...
...
tools/build_out/views/package.20210715165358.py
0 → 100644
View file @
498128c0
from
flask
import
current_app
,
jsonify
,
request
from
flask_restful
import
Resource
from
flask_restful.reqparse
import
RequestParser
from
flask_jwt_extended
import
(
jwt_required
,
get_jwt_identity
)
from
application.signal_manager
import
signalManager
from
models.package
import
getListPackageSchema
,
getListPackagesSchema
,
getPackageSchema
from
webcreator.log
import
logger
from
webcreator.response
import
ResponseCode
,
response_result
class
PackageResourceList
(
Resource
):
def
__init__
(
self
):
pass
# 特殊参数,即不是从json获取参数的接口,可以将这个注释打开
# self.parser = RequestParser()
def
get
(
self
):
# 特殊参数,即不是从json获取参数的接口,可以将这个注释打开
# self.parser.add_argument("page", type=int, location="args", default=1)
# self.parser.add_argument("pageSize", type=int, location="args", default=15)
# args = self.parser.parse_args()
try
:
json_payload
=
request
.
json
logger
.
warn
(
json_payload
)
data
=
getListPackageSchema
.
load
(
json_payload
)
result
=
signalManager
.
actionGetListPackage
.
emit
(
data
)
json_dumps
=
getListPackageSchema
.
dump
(
result
)
if
result
[
0
]:
json_dumps
=
getListPackagesSchema
.
dump
(
result
[
1
])
logger
.
warn
(
json_dumps
)
return
response_result
(
ResponseCode
.
OK
,
data
=
json_dumps
,
count
=
result
[
2
])
return
response_result
(
ResponseCode
.
REQUEST_ERROR
)
except
Exception
as
e
:
current_app
.
logger
.
error
(
e
)
return
response_result
(
ResponseCode
.
DB_ERROR
)
class
PackageResource
(
Resource
):
def
__init__
(
self
):
pass
# 特殊参数,即不是从json获取参数的接口,可以将这个注释打开
# self.parser = RequestParser()
@
jwt_required
(
locations
=
[
"headers"
])
def
get
(
self
,
uuid
):
# 特殊参数,即不是从json获取参数的接口,可以将这个注释打开
# self.parser.add_argument("page", type=int, location="args", default=1)
# self.parser.add_argument("pageSize", type=int, location="args", default=15)
# args = self.parser.parse_args()
try
:
json_payload
=
request
.
json
print
(
"========>"
,
uuid
,
json_payload
)
data
=
getPackageSchema
.
load
(
json_payload
)
result
=
signalManager
.
actionGetPackage
.
emit
(
uuid
,
data
)
if
result
[
0
]:
json_dumps
=
getPackageSchema
.
dump
(
result
[
1
])
return
response_result
(
ResponseCode
.
OK
,
data
=
json_dumps
)
return
response_result
(
ResponseCode
.
NO_DATA
)
except
Exception
as
e
:
current_app
.
logger
.
error
(
e
)
return
response_result
(
ResponseCode
.
DB_ERROR
)
tools/build_out/views/package.py
View file @
498128c0
#!/usr/bin/env python
# -*- coding: utf_8 -*-
from
flask
import
current_app
,
jsonify
,
request
from
flask_restful
import
Resource
from
flask_restful.reqparse
import
RequestParser
...
...
@@ -23,16 +26,16 @@ class PackageResourceList(Resource):
json_payload
=
request
.
json
logger
.
warn
(
json_payload
)
data
=
getListPackageSchema
.
load
(
json_payload
)
result
=
signalManager
.
actionGetListPackage
.
emit
(
data
)
result
,
message
=
signalManager
.
actionGetListPackage
.
emit
(
data
)
json_dumps
=
getListPackageSchema
.
dump
(
result
)
if
result
[
0
]
:
json_dumps
=
getListPackagesSchema
.
dump
(
result
[
1
]
)
if
result
:
json_dumps
=
getListPackagesSchema
.
dump
(
result
.
items
)
logger
.
warn
(
json_dumps
)
return
response_result
(
ResponseCode
.
OK
,
data
=
json_dumps
,
count
=
result
[
2
]
)
return
response_result
(
ResponseCode
.
REQUEST_ERROR
)
return
response_result
(
message
,
data
=
json_dumps
,
count
=
result
.
total
)
return
response_result
(
message
)
except
Exception
as
e
:
current_app
.
logger
.
error
(
e
)
return
response_result
(
ResponseCode
.
DB
_ERROR
)
return
response_result
(
ResponseCode
.
HTTP_SERVER
_ERROR
)
class
PackageResource
(
Resource
):
def
__init__
(
self
):
...
...
@@ -51,11 +54,11 @@ class PackageResource(Resource):
json_payload
=
request
.
json
print
(
"========>"
,
uuid
,
json_payload
)
data
=
getPackageSchema
.
load
(
json_payload
)
result
=
signalManager
.
actionGetPackage
.
emit
(
uuid
,
data
)
if
result
[
0
]
:
json_dumps
=
getPackageSchema
.
dump
(
result
[
1
]
)
return
response_result
(
ResponseCode
.
OK
,
data
=
json_dumps
)
return
response_result
(
ResponseCode
.
NO_DATA
)
result
,
message
=
signalManager
.
actionGetPackage
.
emit
(
uuid
,
data
)
if
result
:
json_dumps
=
getPackageSchema
.
dump
(
result
)
return
response_result
(
message
,
data
=
json_dumps
)
return
response_result
(
message
)
except
Exception
as
e
:
current_app
.
logger
.
error
(
e
)
return
response_result
(
ResponseCode
.
DB
_ERROR
)
return
response_result
(
ResponseCode
.
HTTP_SERVER
_ERROR
)
tools/config.json
View file @
498128c0
...
...
@@ -592,7 +592,7 @@
{
"name"
:
"algorithm"
,
"dataType"
:
"String"
,
"default"
:
"
zlib
"
,
"default"
:
"
'zlib'
"
,
"length"
:
50
,
"required"
:
true
,
"toJson"
:
true
...
...
@@ -600,7 +600,7 @@
{
"name"
:
"file_path"
,
"dataType"
:
"String"
,
"default"
:
null
,
"default"
:
"''"
,
"length"
:
200
,
"required"
:
true
,
"toJson"
:
true
...
...
@@ -608,14 +608,14 @@
{
"name"
:
"source"
,
"dataType"
:
"Integer"
,
"default"
:
null
,
"default"
:
0
,
"required"
:
true
,
"toJson"
:
true
},
{
"name"
:
"user_agent"
,
"dataType"
:
"String"
,
"default"
:
null
,
"default"
:
"''"
,
"length"
:
200
,
"required"
:
true
,
"toJson"
:
true
...
...
@@ -625,13 +625,13 @@
"dataType"
:
"String"
,
"length"
:
200
,
"required"
:
true
,
"default"
:
null
,
"default"
:
"''"
,
"toJson"
:
true
},
{
"name"
:
"ip"
,
"dataType"
:
"String"
,
"default"
:
null
,
"default"
:
"'127.0.0.1'"
,
"length"
:
128
,
"required"
:
true
,
"toJson"
:
true
...
...
@@ -639,7 +639,7 @@
{
"name"
:
"geo_location"
,
"dataType"
:
"String"
,
"default"
:
null
,
"default"
:
"''"
,
"length"
:
200
,
"required"
:
true
,
"toJson"
:
true
...
...
@@ -649,7 +649,7 @@
"dataType"
:
"String"
,
"length"
:
50
,
"required"
:
true
,
"default"
:
null
,
"default"
:
"''"
,
"toJson"
:
true
}
]
...
...
tools/gen_code.py
View file @
498128c0
...
...
@@ -102,8 +102,9 @@ def copyFiles(src_dir, dst_dir):
if
not
os
.
path
.
exists
(
save_path
):
os
.
makedirs
(
save_path
)
shutil
.
copy
(
src_file
,
save_path
)
# 目标文件是否存在?
shutil
.
copy2
(
src_file
,
save_path
)
log
.
logger
.
info
(
'copy files finished!'
)
def
handleModuleConfig
(
config
):
...
...
tools/logs/running.log
View file @
498128c0
[2021-07-14 18:14:14,257][ INFO][in gen_code.py -> copyFiles line:107] copy files finished!
[2021-07-15 10:18:49,740][ INFO][in gen_code.py -> copyFiles line:107] copy files finished!
[2021-07-15 10:18:49,941][ ERROR][in gen_code.py -> handleModules line:132] 文件:%s 不存在
[2021-07-15 16:53:58,622][ INFO][in gen_code.py -> copyFiles line:108] copy files finished!
[2021-07-15 16:53:58,778][ ERROR][in gen_code.py -> handleModules line:133] 文件:%s 不存在
[2021-07-15 16:56:02,228][ INFO][in gen_code.py -> copyFiles line:108] copy files finished!
[2021-07-15 16:56:02,383][ ERROR][in gen_code.py -> handleModules line:133] 文件:%s 不存在
[2021-07-15 17:08:04,652][ INFO][in gen_code.py -> copyFiles line:108] copy files finished!
[2021-07-15 17:08:04,829][ ERROR][in gen_code.py -> handleModules line:133] 文件:%s 不存在
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