The size of the file to deploy is: 78KB
Created deploy.sh
file and when I run it directly on terminal it pushes the file as is. But when i run the same script from Flask application, it only pushes 72KB (or multiply by 8) and its skipping part of the file.
cd <PATH TO REPOSITORY PATH>
git add directory/* --force
git pull
git commit -m "updated from bash"
git push
python script
def push_from_local():
os.system("./commit.sh")
Its resolved. I tried to run the command while write the file, thats what the issue happen
the wrong method i've used
with open(config_file_name, 'w') as outfile:
print("Writing to file")
json.dump(req, outfile, indent=4)
print("Config file is ready for push")
github_util.push_new_file_to_github(config_file_name,"DatacloudIntl/dcapi","master","config/column_maps/"+domain_name+".json", False)
replaced as this and it works....
with open(config_file_name, 'w') as outfile:
print("Writing to file")
json.dump(req, outfile, indent=4)
print("Config file is ready for push")
github_util.push_new_file_to_github(config_file_name,"DatacloudIntl/dcapi","master","config/column_maps/"+domain_name+".json", False)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.