def execute_special_task(self, task):

        start = datetime.now()
        s3 = current.response.s3
        if task[0] == 2:
            fun = task[1]
            filepath = task[2]
            extraArgs = task[3]
            if filepath is None:
                if extraArgs is None:
                    error = s3[fun]()
                else:
                    error = s3[fun](*extraArgs)
            elif extraArgs is None:
                error = s3[fun](filepath)
            else:
                error = s3[fun](filepath, *extraArgs)
            if error:
                self.errorList.append(error)
            end = datetime.now()
            duration = end - start
            try:
                # Python 2.7
                duration = '{:.2f}'.format(duration.total_seconds()/60)
                msg = "%s import job completed in %s mins" % (fun, duration)
            except AttributeError:
                # older Python
                msg = "%s import job completed in %s" % (fun, duration)
            self.resultList.append(msg)
            current.log.debug(msg)

    # -------------------------------------------------------------------------
Execute import tasks which require a custom function,
dataset/ETHPy150Open sahana/eden/modules/s3/s3import.py/S3BulkImporter.execute_special_task