GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

CrawlCommand.take_action()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
c 0
b 0
f 0
dl 0
loc 4
rs 10
1
# -*- coding: utf-8 -*-
2
from pyjobs_crawlers.run import start_crawlers
3
4
from crawlers import PyJobsWebConnector
5
from pyjobsweb.commands import AppContextCommand
6
7
8
class CrawlCommand(AppContextCommand):
9
    """
10
    Start job boards crawlers to feed the PostgreSQL database
11
    """
12
    def get_parser(self, prog_name):
13
        parser = super(CrawlCommand, self).get_parser(prog_name)
14
15
        parser.add_argument('-p', '--processes',
16
                            help='Number of processes used (set 0 to use main '
17
                                 'process)',
18
                            dest='processes', default=0)
19
20
        return parser
21
22
    def take_action(self, parsed_args):
23
        super(CrawlCommand, self).take_action(parsed_args)
24
        start_crawlers(connector_class=PyJobsWebConnector,
25
                       num_processes=parsed_args.processes)
26