refresh_backend_links: nicer message when aborted with Ctrl+C
This commit is contained in:
parent
de36f1727a
commit
82c89b0c97
@ -592,7 +592,11 @@ def refresh_backend_links(backend_name, chunk_size=50, quiet=False, window=12):
|
|||||||
|
|
||||||
chunk_size = int(chunk_size) # CLI parameters are passed as strings
|
chunk_size = int(chunk_size) # CLI parameters are passed as strings
|
||||||
from application.modules import file_storage
|
from application.modules import file_storage
|
||||||
file_storage.refresh_links_for_backend(backend_name, chunk_size, window * 3600)
|
|
||||||
|
try:
|
||||||
|
file_storage.refresh_links_for_backend(backend_name, chunk_size, window * 3600)
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print('Aborted due to keyboard interrupt.')
|
||||||
|
|
||||||
|
|
||||||
@manager.command
|
@manager.command
|
||||||
|
Loading…
x
Reference in New Issue
Block a user