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   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 18
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A take_action() 0 4 1
A get_parser() 0 9 1
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