Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
physical
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
吴升宇
physical
Commits
d5e01e75
Commit
d5e01e75
authored
Feb 19, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
7f9142bb
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
28 deletions
+1
-28
views.py
injection/data_sync/views.py
+0
-7
__init__.py
physical/__init__.py
+1
-1
celery.py
physical/celery.py
+0
-20
No files found.
injection/data_sync/views.py
View file @
d5e01e75
from
django.shortcuts
import
render
# Create your views here.
from
injection.data_sync.tasks
import
sync_face_similar_data_to_redis
def
post
(
request
):
result
=
sync_face_similar_data_to_redis
()
physical/__init__.py
View file @
d5e01e75
...
...
@@ -4,5 +4,5 @@ import pymysql
from
_celery
import
app
as
celery_app
pymysql
.
install_as_MySQLdb
()
__all__
=
(
'celery_app'
,)
#
__all__ = ('celery_app',)
physical/celery.py
View file @
d5e01e75
...
...
@@ -22,23 +22,3 @@ app.conf.broker_url = settings.CELERY_BROKER_URL
@app.task
(
bind
=
True
)
def
debug_task
(
self
):
print
(
'Request: {0!r}'
.
format
(
self
.
request
))
from
celery.schedules
import
crontab
app
.
conf
.
update
(
CELERYBEAT_SCHEDULE
=
{
'sum-task'
:
{
'task'
:
'deploy.tasks.add'
,
'schedule'
:
crontab
(
hour
=
1
),
'args'
:
(
5
,
6
)
},
'send-report'
:
{
'task'
:
'deploy.tasks.report'
,
'schedule'
:
crontab
(
hour
=
4
,
minute
=
30
,
day_of_week
=
1
),
}
}
)
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