Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
02450a13
authored
Jun 04, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: added priority parameters for tasks
parent
59f2221c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
circle/storage/tasks/local_tasks.py
+6
-4
No files found.
circle/storage/tasks/local_tasks.py
View file @
02450a13
...
...
@@ -3,14 +3,16 @@ from celery.contrib.abortable import AbortableTask
@celery.task
def
check_queue
(
storage
,
queue_id
):
def
check_queue
(
storage
,
queue_id
,
priority
):
''' Celery inspect job to check for active workers at queue_id
return True/False
'''
drivers
=
[
'storage'
,
'download'
]
worker_list
=
[
storage
+
"."
+
d
for
d
in
drivers
]
queue_name
=
storage
+
"."
+
queue_id
active_queues
=
celery
.
control
.
inspect
(
worker_list
)
.
active_queues
()
if
priority
is
not
None
:
queue_name
=
queue_name
+
"."
+
priority
inspect
=
celery
.
control
.
inspect
()
inspect
.
timeout
=
0.1
active_queues
=
inspect
.
active_queues
()
if
active_queues
is
None
:
return
False
...
...
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