Browse Source

Allow specifying task number in config.

tags/v0.3
Ben Kurtovic 7 years ago
parent
commit
178428cb97
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      earwigbot/tasks/__init__.py

+ 4
- 0
earwigbot/tasks/__init__.py View File

@@ -54,6 +54,10 @@ class Task(object):
self.bot = bot self.bot = bot
self.config = bot.config self.config = bot.config
self.logger = bot.tasks.logger.getChild(self.name) self.logger = bot.tasks.logger.getChild(self.name)

number = self.config.tasks.get(self.name, {}).get("number")
if number is not None:
self.number = number
self.setup() self.setup()


def __repr__(self): def __repr__(self):


Loading…
Cancel
Save