Explorar el Código

Fix wait_temporary_metadata checking for incorrect filenames

tags/v1.1
JustAnotherArchivist hace 1 año
padre
commit
ee581f5c5c
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. +2
    -2
      codearchiver/storage.py

+ 2
- 2
codearchiver/storage.py Ver fichero

@@ -218,11 +218,11 @@ class DirectoryStorage(Storage):

def wait_temporary_metadata(self, names, sleepTime = 5):
_logger.info(f'Waiting for temporary metadata: {names!r}')
remaining = set(names)
remaining = {os.path.join(self._directory, f'{name}_codearchiver_temporary_metadata.txt') for name in names}
while remaining:
with self.lock(blocking = False) as locked:
if locked:
remaining = set(filename for filename in remaining if os.path.exists(os.path.join(self._directory, filename)))
remaining = {filename for filename in remaining if os.path.exists(filename)}
if not remaining:
break
time.sleep(sleepTime)


Cargando…
Cancelar
Guardar