зеркало из https://github.com/mozilla/treeherder.git
add fetch_pending_jobs task
This commit is contained in:
Родитель
237c17b621
Коммит
4deb7863a8
|
@ -1,14 +1,13 @@
|
|||
import celery
|
||||
from treeherder.buildapi_consumer import BuildApiConsumer
|
||||
from treeherder.etl.buildapi import TreeherderBuildapiAdapter
|
||||
|
||||
|
||||
@celery.task(name='fetch-pending-jobs')
|
||||
def fetch_pending_jobs():
|
||||
consumer = BuildApiConsumer()
|
||||
consumer.fetch_pending_jobs()
|
||||
adpter = TreeherderBuildapiAdapter()
|
||||
adapter.process_pending_jobs()
|
||||
|
||||
|
||||
@celery.task(name='fetch-running-jobs')
|
||||
def fetch_running_jobs():
|
||||
consumer = BuildApiConsumer()
|
||||
consumer.fetch_running_jobs()
|
||||
# @celery.task(name='fetch-running-jobs')
|
||||
# def fetch_running_jobs():
|
||||
# consumer = BuildApiConsumer()
|
||||
# consumer.fetch_running_jobs()
|
||||
|
|
Загрузка…
Ссылка в новой задаче