I have a celery task like this:
我有一个芹菜任务:
@celery.task
def file_transfer(password, source12, destination):
result = subprocess.Popen(['sshpass', '-p', password, 'rsync', '-avz', source12, destination],
stderr=subprocess.PIPE, stdout=subprocess.PIPE).communicate()[0]
return result
@