Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
崔为之
elp
Commits
2a7ada74
Commit
2a7ada74
authored
Nov 11, 2023
by
崔为之
💪🏽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update project
parent
d3969b3c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
application/config/config.yaml
application/config/config.yaml
+1
-1
application/libs/tasks/task.py
application/libs/tasks/task.py
+9
-1
No files found.
application/config/config.yaml
View file @
2a7ada74
...
...
@@ -39,6 +39,6 @@ Redis:
DB
:
13
Scheduler
:
Start
:
2023-11-11 15:
20
:00
Start
:
2023-11-11 15:
34
:00
End
:
2099-11-11 16:00:00
Timezone
:
Asia/Shanghai
application/libs/tasks/task.py
View file @
2a7ada74
...
...
@@ -10,6 +10,9 @@
# @Description :
"""
from
application.extensions.init_sqlalchemy
import
db
from
application.models
import
User
def
task
():
"""
...
...
@@ -17,4 +20,9 @@ def task():
:return: None
"""
print
(
1
)
with
db
.
app
.
app_context
():
print
(
"create user"
)
user
=
User
(
username
=
"CWZ"
,
email
=
"Stu@outlook.com"
,
password
=
"qwe!2345"
,
active
=
True
)
db
.
session
.
add
(
user
)
db
.
session
.
commit
()
print
(
"created user admin"
)
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