Ejemplo n.º 1
0
    def execute(self):

        self.syncdb = SyncDbCommand(args=self.args,
                                    settings=self.settings,
                                    **self.kwargs)
        self.syncdb.checked_execute()

        self.project_type.run(self)
Ejemplo n.º 2
0
    def execute(self):
        self.syncdb = SyncDbCommand(args=self.args,
                                    settings=self.settings,
                                    **self.kwargs)

        connector = connectors[self.settings.DATABASE_ENGINE](self.settings)
        elixir.metadata.bind = connector.get_connection_string()
        elixir.metadata.bind.echo = self.settings.SHOW_DEBUG_INFO
        elixir.cleanup_all(True)

        self.syncdb.checked_execute()
Ejemplo n.º 3
0
class RunCommand(ProjectCommand):
    """
        Run the user's crawler

        Reads the crawlers.py file to obtain the user's crawler classes
        and then run these crawlers.
    """

    name = "run"

    def execute(self):
        
        self.syncdb = SyncDbCommand(args=self.args, settings=self.settings)
        self.syncdb.checked_execute()        

        self.project_type.run(self)
Ejemplo n.º 4
0
class MigrateDbCommand(ProjectCommand):
    """
        Migrate up the DataBase.

        Reads the models.py user's file and generate a database from it.
    """

    name = "migratedb"

    def execute(self):
        self.syncdb = SyncDbCommand(args=self.args, settings=self.settings, **self.kwargs)

        connector = connectors[self.settings.DATABASE_ENGINE](self.settings)
        elixir.metadata.bind = connector.get_connection_string()
        elixir.metadata.bind.echo = self.settings.SHOW_DEBUG_INFO
        elixir.cleanup_all(True)

        self.syncdb.checked_execute()
Ejemplo n.º 5
0
    def execute(self):
        self.syncdb = SyncDbCommand(args=self.args, settings=self.settings, **self.kwargs)

        connector = connectors[self.settings.DATABASE_ENGINE](self.settings)
        elixir.metadata.bind = connector.get_connection_string()
        elixir.metadata.bind.echo = self.settings.SHOW_DEBUG_INFO
        elixir.cleanup_all(True)

        self.syncdb.checked_execute()
Ejemplo n.º 6
0
class RunCommand(ProjectCommand):
    """
        Run the user's crawler

        Reads the crawlers.py file to obtain the user's crawler classes
        and then run these crawlers.
    """

    name = "run"

    def execute(self):

        self.syncdb = SyncDbCommand(args=self.args,
                                    settings=self.settings,
                                    **self.kwargs)
        self.syncdb.checked_execute()

        self.project_type.run(self)
Ejemplo n.º 7
0
class MigrateDbCommand(ProjectCommand):
    """
        Migrate up the DataBase.

        Reads the models.py user's file and generate a database from it.
    """

    name = "migratedb"

    def execute(self):
        self.syncdb = SyncDbCommand(args=self.args,
                                    settings=self.settings,
                                    **self.kwargs)

        connector = connectors[self.settings.DATABASE_ENGINE](self.settings)
        elixir.metadata.bind = connector.get_connection_string()
        elixir.metadata.bind.echo = self.settings.SHOW_DEBUG_INFO
        elixir.cleanup_all(True)

        self.syncdb.checked_execute()
Ejemplo n.º 8
0
    def execute(self):
        
        self.syncdb = SyncDbCommand(args=self.args, settings=self.settings)
        self.syncdb.checked_execute()        

        self.project_type.run(self)