Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
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
ops
jumpserver
Commits
cd22c390
Commit
cd22c390
authored
Nov 23, 2016
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[future] 将Task移到一个包内管理
parent
32a5aec3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
20 deletions
+5
-20
hands.py
apps/ops/hands.py
+0
-15
__init__.py
apps/ops/tasks/__init__.py
+0
-0
_celery_tasks.py
apps/ops/tasks/_celery_tasks.py
+0
-0
taskers.py
apps/ops/tasks/taskers.py
+4
-4
views.py
apps/ops/views.py
+1
-1
No files found.
apps/ops/hands.py
deleted
100644 → 0
View file @
32a5aec3
"""
jumpserver.__app__.hands.py
~~~~~~~~~~~~~~~~~
This app depends other apps api, function .. should be import or write mack here.
Other module of this app shouldn't connect with other app.
:copyright: (c) 2014-2016 by Jumpserver Team.
:license: GPL v2, see LICENSE for more details.
"""
from
users.utils
import
AdminUserRequiredMixin
\ No newline at end of file
apps/ops/tasks/__init__.py
0 → 100644
View file @
cd22c390
apps/ops/tasks.py
→
apps/ops/tasks
/_celery_tasks
.py
View file @
cd22c390
File moved
apps/ops/taskers.py
→
apps/ops/task
s/task
ers.py
View file @
cd22c390
# ~*~ coding: utf-8 ~*~
from
__future__
import
unicode_literals
from
.tasks
import
*
from
ops.tasks
import
_celery_tasks
from
.models
import
Tasker
from
ops
.models
import
Tasker
from
uuid
import
uuid1
from
celery.result
import
AsyncResult
...
...
@@ -52,7 +52,7 @@ def __get_result_by_tasker_id(tasker_uuid, deal_method):
def
start_get_hardware_info
(
*
assets
):
name
=
"Get host hardware information"
uuid
=
"tasker-"
+
uuid1
()
.
hex
get_asset_hardware_info
.
delay
(
name
,
uuid
,
*
assets
)
_celery_tasks
.
get_asset_hardware_info
.
delay
(
name
,
uuid
,
*
assets
)
return
uuid
...
...
@@ -90,7 +90,7 @@ def get_hardware_info(tasker_uuid):
def
start_ping_test
(
*
assets
):
name
=
"Test host connection"
uuid
=
"tasker-"
+
uuid1
()
.
hex
asset_test_ping_check
.
delay
(
name
,
uuid
,
*
assets
)
_celery_tasks
.
asset_test_ping_check
.
delay
(
name
,
uuid
,
*
assets
)
return
uuid
...
...
apps/ops/views.py
View file @
cd22c390
...
...
@@ -6,7 +6,7 @@ from django.views.generic.list import ListView, MultipleObjectMixin
from
django.views.generic.edit
import
CreateView
,
DeleteView
,
UpdateView
from
django.views.generic.detail
import
DetailView
,
SingleObjectMixin
from
.hand
s
import
AdminUserRequiredMixin
from
users.util
s
import
AdminUserRequiredMixin
from
.utils.mixins
import
CreateSudoPrivilegesMixin
,
ListSudoPrivilegesMixin
from
models
import
*
...
...
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