Remove explicit setting of the task base class
since it's now the default base class in swh-scheduler (>= 0.0.39)
This commit is contained in:
parent
6030cb6315
commit
f46f3e2015
6 changed files with 19 additions and 25 deletions
|
@ -6,7 +6,6 @@ import random
|
|||
from celery import group
|
||||
|
||||
from swh.scheduler.celery_backend.config import app
|
||||
from swh.scheduler.task import SWHTask
|
||||
|
||||
from .lister import BitBucketLister
|
||||
|
||||
|
@ -18,7 +17,7 @@ def new_lister(api_baseurl='https://api.bitbucket.org/2.0'):
|
|||
|
||||
|
||||
@app.task(name='swh.lister.bitbucket.tasks.IncrementalBitBucketLister',
|
||||
base=SWHTask, bind=True)
|
||||
bind=True)
|
||||
def incremental_bitbucket_lister(self, **lister_args):
|
||||
self.log.debug('%s, lister_args=%s' % (
|
||||
self.name, lister_args))
|
||||
|
@ -28,7 +27,7 @@ def incremental_bitbucket_lister(self, **lister_args):
|
|||
|
||||
|
||||
@app.task(name='swh.lister.bitbucket.tasks.RangeBitBucketLister',
|
||||
base=SWHTask, bind=True)
|
||||
bind=True)
|
||||
def range_bitbucket_lister(self, start, end, **lister_args):
|
||||
self.log.debug('%s(start=%s, end=%d), lister_args=%s' % (
|
||||
self.name, start, end, lister_args))
|
||||
|
@ -38,7 +37,7 @@ def range_bitbucket_lister(self, start, end, **lister_args):
|
|||
|
||||
|
||||
@app.task(name='swh.lister.bitbucket.tasks.FullBitBucketRelister',
|
||||
base=SWHTask, bind=True)
|
||||
bind=True)
|
||||
def full_bitbucket_relister(self, split=None, **lister_args):
|
||||
self.log.debug('%s, lister_args=%s' % (
|
||||
self.name, lister_args))
|
||||
|
@ -53,7 +52,7 @@ def full_bitbucket_relister(self, split=None, **lister_args):
|
|||
|
||||
|
||||
@app.task(name='swh.lister.bitbucket.tasks.ping',
|
||||
base=SWHTask, bind=True)
|
||||
bind=True)
|
||||
def ping(self):
|
||||
self.log.debug(self.name)
|
||||
return 'OK'
|
||||
|
|
|
@ -3,13 +3,12 @@
|
|||
# See top-level LICENSE file for more information
|
||||
|
||||
from swh.scheduler.celery_backend.config import app
|
||||
from swh.scheduler.task import SWHTask
|
||||
|
||||
from .lister import DebianLister
|
||||
|
||||
|
||||
@app.task(name='swh.lister.debian.tasks.DebianListerTask',
|
||||
base=SWHTask, bind=True)
|
||||
bind=True)
|
||||
def debian_lister(self, distribution, **lister_args):
|
||||
self.log.debug('%s, lister_args=%s' % (
|
||||
self.name, lister_args))
|
||||
|
@ -18,7 +17,7 @@ def debian_lister(self, distribution, **lister_args):
|
|||
|
||||
|
||||
@app.task(name='swh.lister.debian.tasks.ping',
|
||||
base=SWHTask, bind=True)
|
||||
bind=True)
|
||||
def ping(self):
|
||||
self.log.debug(self.name)
|
||||
return 'OK'
|
||||
|
|
|
@ -7,7 +7,6 @@ import random
|
|||
from celery import group
|
||||
|
||||
from swh.scheduler.celery_backend.config import app
|
||||
from swh.scheduler.task import SWHTask
|
||||
|
||||
from swh.lister.github.lister import GitHubLister
|
||||
|
||||
|
@ -19,7 +18,7 @@ def new_lister(api_baseurl='https://api.github.com', **kw):
|
|||
|
||||
|
||||
@app.task(name='swh.lister.github.tasks.IncrementalGitHubLister',
|
||||
base=SWHTask, bind=True)
|
||||
bind=True)
|
||||
def incremental_github_lister(self, **lister_args):
|
||||
self.log.debug('%s, lister_args=%s' % (
|
||||
self.name, lister_args))
|
||||
|
@ -29,7 +28,7 @@ def incremental_github_lister(self, **lister_args):
|
|||
|
||||
|
||||
@app.task(name='swh.lister.github.tasks.RangeGitHubLister',
|
||||
base=SWHTask, bind=True)
|
||||
bind=True)
|
||||
def range_github_lister(self, start, end, **lister_args):
|
||||
self.log.debug('%s(start=%s, end=%d), lister_args=%s' % (
|
||||
self.name, start, end, lister_args))
|
||||
|
@ -39,7 +38,7 @@ def range_github_lister(self, start, end, **lister_args):
|
|||
|
||||
|
||||
@app.task(name='swh.lister.github.tasks.FullGitHubRelister',
|
||||
base=SWHTask, bind=True)
|
||||
bind=True)
|
||||
def full_github_relister(self, split=None, **lister_args):
|
||||
self.log.debug('%s, lister_args=%s' % (
|
||||
self.name, lister_args))
|
||||
|
@ -54,7 +53,7 @@ def full_github_relister(self, split=None, **lister_args):
|
|||
|
||||
|
||||
@app.task(name='swh.lister.github.tasks.ping',
|
||||
base=SWHTask, bind=True)
|
||||
bind=True)
|
||||
def ping(self):
|
||||
self.log.debug(self.name)
|
||||
return 'OK'
|
||||
|
|
|
@ -7,7 +7,6 @@ import random
|
|||
from celery import group
|
||||
|
||||
from swh.scheduler.celery_backend.config import app
|
||||
from swh.scheduler.task import SWHTask
|
||||
|
||||
from .. import utils
|
||||
from .lister import GitLabLister
|
||||
|
@ -24,7 +23,7 @@ def new_lister(api_baseurl='https://gitlab.com/api/v4',
|
|||
|
||||
|
||||
@app.task(name='swh.lister.gitlab.tasks.IncrementalGitLabLister',
|
||||
base=SWHTask, bind=True)
|
||||
bind=True)
|
||||
def incremental_gitlab_lister(self, **lister_args):
|
||||
self.log.debug('%s, lister_args=%s' % (
|
||||
self.name, lister_args))
|
||||
|
@ -37,7 +36,7 @@ def incremental_gitlab_lister(self, **lister_args):
|
|||
|
||||
|
||||
@app.task(name='swh.lister.gitlab.tasks.RangeGitLabLister',
|
||||
base=SWHTask, bind=True)
|
||||
bind=True)
|
||||
def range_gitlab_lister(self, start, end, **lister_args):
|
||||
self.log.debug('%s(start=%s, end=%d), lister_args=%s' % (
|
||||
self.name, start, end, lister_args))
|
||||
|
@ -47,7 +46,7 @@ def range_gitlab_lister(self, start, end, **lister_args):
|
|||
|
||||
|
||||
@app.task(name='swh.lister.gitlab.tasks.FullGitLabRelister',
|
||||
base=SWHTask, bind=True)
|
||||
bind=True)
|
||||
def full_gitlab_relister(self, **lister_args):
|
||||
self.log.debug('%s, lister_args=%s' % (
|
||||
self.name, lister_args))
|
||||
|
@ -63,7 +62,7 @@ def full_gitlab_relister(self, **lister_args):
|
|||
|
||||
|
||||
@app.task(name='swh.lister.gitlab.tasks.ping',
|
||||
base=SWHTask, bind=True)
|
||||
bind=True)
|
||||
def ping(self):
|
||||
self.log.debug(self.name)
|
||||
return 'OK'
|
||||
|
|
|
@ -6,7 +6,6 @@ from datetime import datetime
|
|||
from contextlib import contextmanager
|
||||
|
||||
from swh.scheduler.celery_backend.config import app
|
||||
from swh.scheduler.task import SWHTask
|
||||
|
||||
from swh.lister.npm.lister import NpmLister, NpmIncrementalLister
|
||||
from swh.lister.npm.models import NpmVisitModel
|
||||
|
@ -42,7 +41,7 @@ def get_last_update_seq(lister):
|
|||
|
||||
|
||||
@app.task(name='swh.lister.npm.tasks.NpmListerTask',
|
||||
base=SWHTask, bind=True)
|
||||
bind=True)
|
||||
def npm_lister(self, **lister_args):
|
||||
self.log.debug('%s, lister_args=%s' % (
|
||||
self.name, lister_args))
|
||||
|
@ -53,7 +52,7 @@ def npm_lister(self, **lister_args):
|
|||
|
||||
|
||||
@app.task(name='swh.lister.npm.tasks.NpmIncrementalListerTask',
|
||||
base=SWHTask, bind=True)
|
||||
bind=True)
|
||||
def npm_incremental_lister(self, **lister_args):
|
||||
self.log.debug('%s, lister_args=%s' % (
|
||||
self.name, lister_args))
|
||||
|
@ -65,7 +64,7 @@ def npm_incremental_lister(self, **lister_args):
|
|||
|
||||
|
||||
@app.task(name='swh.lister.npm.tasks.ping',
|
||||
base=SWHTask, bind=True)
|
||||
bind=True)
|
||||
def ping(self):
|
||||
self.log.debug(self.name)
|
||||
return 'OK'
|
||||
|
|
|
@ -2,14 +2,13 @@
|
|||
# License: GNU General Public License version 3, or any later version
|
||||
# See top-level LICENSE file for more information
|
||||
|
||||
from swh.scheduler.task import SWHTask
|
||||
from swh.scheduler.celery_backend.config import app
|
||||
|
||||
from .lister import PyPILister
|
||||
|
||||
|
||||
@app.task(name='swh.lister.pypi.tasks.PyPIListerTask',
|
||||
base=SWHTask, bind=True)
|
||||
bind=True)
|
||||
def pypi_lister(self, **lister_args):
|
||||
self.log.debug('%s(), lister_args=%s' % (
|
||||
self.name, lister_args))
|
||||
|
@ -18,7 +17,7 @@ def pypi_lister(self, **lister_args):
|
|||
|
||||
|
||||
@app.task(name='swh.lister.pypi.tasks.ping',
|
||||
base=SWHTask, bind=True)
|
||||
bind=True)
|
||||
def ping(self):
|
||||
self.log.debug(self.name)
|
||||
return 'OK'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue