Browse Source

cleaning up existing task skeletons and making task_name class-wide instead of instance-wide

tags/v0.1^2
Ben Kurtovic 13 years ago
parent
commit
7bbffaed92
8 changed files with 46 additions and 36 deletions
  1. +6
    -4
      wiki/tasks/afc_catdelink.py
  2. +6
    -4
      wiki/tasks/afc_copyvios.py
  3. +5
    -4
      wiki/tasks/afc_dailycats.py
  4. +7
    -8
      wiki/tasks/afc_statistics.py
  5. +5
    -4
      wiki/tasks/afc_undated.py
  6. +6
    -4
      wiki/tasks/blptag.py
  7. +5
    -4
      wiki/tasks/feed_dailycats.py
  8. +6
    -4
      wiki/tasks/wrongmime.py

+ 6
- 4
wiki/tasks/afc_catdelink.py View File

@@ -1,12 +1,14 @@
# -*- coding: utf-8 -*-

# A task to delink mainspace categories in declined [[WP:AFC]] submissions.

from wiki.base_task import BaseTask

class Task(BaseTask):
"""A task to delink mainspace categories in declined [[WP:AFC]]
submissions."""
task_name = "afc_catdelink"

def __init__(self):
self.task_name = "afc_catdelink"
pass
def run(self, **kwargs):
pass

+ 6
- 4
wiki/tasks/afc_copyvios.py View File

@@ -1,12 +1,14 @@
# -*- coding: utf-8 -*-

# A task to check newly-edited [[WP:AFC]] submissions for copyright violations.

from wiki.base_task import BaseTask

class Task(BaseTask):
"""A task to check newly-edited [[WP:AFC]] submissions for copyright
violations."""
task_name = "afc_copyvios"

def __init__(self):
self.task_name = "afc_copyvios"
pass
def run(self, **kwargs):
pass

+ 5
- 4
wiki/tasks/afc_dailycats.py View File

@@ -1,12 +1,13 @@
# -*- coding: utf-8 -*-

# A task to create daily categories for [[WP:AFC]].

from wiki.base_task import BaseTask

class Task(BaseTask):
""" A task to create daily categories for [[WP:AFC]]."""
task_name = "afc_dailycats"

def __init__(self):
self.task_name = "afc_dailycats"
pass
def run(self, **kwargs):
pass

+ 7
- 8
wiki/tasks/afc_statistics.py View File

@@ -1,15 +1,14 @@
# -*- coding: utf-8 -*-

# A task to generate statistics for [[WP:AFC]] and save them to [[Template:AFC_statistics]].

import time

from wiki.base_task import BaseTask

class Task(BaseTask):
"""A task to generate statistics for [[WP:AFC]] and save them to
[[Template:AFC_statistics]]."""
task_name = "afc_statistics"

def __init__(self):
self.task_name = "afc_statistics"
pass
def run(self, **kwargs):
time.sleep(10)
print "kwargs: {}".format(kwargs)
pass

+ 5
- 4
wiki/tasks/afc_undated.py View File

@@ -1,12 +1,13 @@
# -*- coding: utf-8 -*-

# A task to clear [[Category:Undated AfC submissions]].

from wiki.base_task import BaseTask

class Task(BaseTask):
"""A task to clear [[Category:Undated AfC submissions]]."""
task_name = "afc_undated"

def __init__(self):
self.task_name = "afc_undated"
pass
def run(self, **kwargs):
pass

+ 6
- 4
wiki/tasks/blptag.py View File

@@ -1,12 +1,14 @@
# -*- coding: utf-8 -*-

# A task to add |blp=yes to {{WPB}} or {{WPBS}} when it is used along with {{WP Biography}}.

from wiki.base_task import BaseTask

class Task(BaseTask):
"""A task to add |blp=yes to {{WPB}} or {{WPBS}} when it is used along with
{{WP Biography}}."""
task_name = "blptag"

def __init__(self):
self.task_name = "blptag"
pass
def run(self, **kwargs):
pass

+ 5
- 4
wiki/tasks/feed_dailycats.py View File

@@ -1,12 +1,13 @@
# -*- coding: utf-8 -*-

# A task to create daily categories for [[WP:FEED]].

from wiki.base_task import BaseTask

class Task(BaseTask):
"""A task to create daily categories for [[WP:FEED]]."""
task_name = "feed_dailycats"

def __init__(self):
self.task_name = "feed_dailycats"
pass
def run(self, **kwargs):
pass

+ 6
- 4
wiki/tasks/wrongmime.py View File

@@ -1,12 +1,14 @@
# -*- coding: utf-8 -*-

# A task to tag files whose extensions do not agree with their MIME type.

from wiki.base_task import BaseTask

class Task(BaseTask):
"""A task to tag files whose extensions do not agree with their MIME
type."""
task_name = "wrongmime"

def __init__(self):
self.task_name = "wrongmime"
pass
def run(self, **kwargs):
pass

Loading…
Cancel
Save