mail.py 404B

1234567891011121314151617
  1. # -*- coding: utf-8 -*-
  2. from rq import Connection, Worker
  3. from tracim.command import AppContextCommand
  4. class MailSenderCommend(AppContextCommand):
  5. def get_description(self):
  6. return '''Run rq worker for mail sending'''
  7. def take_action(self, parsed_args):
  8. super().take_action(parsed_args)
  9. with Connection():
  10. w = Worker(['mail_sender'])
  11. w.work()