Ejemplo n.º 1
0
Archivo: Loader.py Proyecto: wmfs/chimp
    def processStageCsv(self, dataConnection, dataCursor, taskId, processLimit, specification, args, appLogger):
        filename = args["filename"]
        fileIdentification = args["fileIdentification"]
        self.queue.startTask(taskId, True)

        stager = Stager(
            self.queue,
            self.supportConnection,
            self.supportCursor,
            dataConnection,
            dataCursor,
            taskId,
            specification,
            self.settings.paths,
            self.settings.env["dataCommitThreshold"],
            self.settings.appLogger,
        )
        stager.stageCSV(filename, processLimit)
        return (
            fileIdentification,
            stager.successCount,
            stager.exceptionCount,
            stager.errorCount,
            stager.warningCount,
            stager.ignoredCount,
            stager.noticeCount,
        )
Ejemplo n.º 2
0
Archivo: Loader.py Proyecto: wmfs/chimp
    def processStageJSON(self, dataConnection, dataCursor, taskId, processLimit, specification, args):
        self.queue.startTask(taskId, True)

        stager = Stager(
            self.queue,
            self.supportConnection,
            self.supportCursor,
            dataConnection,
            dataCursor,
            taskId,
            specification,
            self.settings.paths,
            self.settings.env["dataCommitThreshold"],
            self.settings.appLogger,
        )
        stager.stageJSON(args["recordIdentification"], args["record"])
        return (
            stager.successCount,
            stager.exceptionCount,
            stager.errorCount,
            stager.warningCount,
            stager.ignoredCount,
            stager.noticeCount,
        )