Пример #1
0
def delete_file(path):
    """Deletes a file.

    This task is meant to be invoked with a delay, i.e. like this::

        delete_file.apply_async(args=[file_path], countdown=3600)

    :param path: The absolute path to the file.
    """
    if not os.path.isabs(path):
        raise ValueError('Path is not absolute: {}'.format(path))
    Logger.get().info('Deleting {}'.format(path))
    silentremove(path)
Пример #2
0
def delete_file(path):
    """Deletes a file.

    This task is meant to be invoked with a delay, i.e. like this::

        delete_file.apply_async(args=[file_path], countdown=3600)

    :param path: The absolute path to the file.
    """
    if not os.path.isabs(path):
        raise ValueError('Path is not absolute: {}'.format(path))
    Logger.get().info('Deleting {}'.format(path))
    silentremove(path)
Пример #3
0
 def delete(self, key):
     path = self._getFilePath(key, False)
     if os.path.exists(path):
         silentremove(path)
     return 1
Пример #4
0
 def delete(self, key):
     path = self._getFilePath(key, False)
     if os.path.exists(path):
         silentremove(path)
     return 1