-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update script to include additional functions #1
Conversation
update script to include the following: - globals for folder IDs and execution start timestamp - convert console output to logger output to store output for later forwarding - email notifications for execution start and completion with stored console log email
Nice fixes, not sure I fully understand the implications of using PropertiesService.getScriptProperties but I will try it out. |
well since google scripts doesn't have a conventional concept of a global variable assignment they set a "Static" variable that can be called with those functions. that's the only way i could think of to assign a single variable that is accessible to both the function method as well as the main thread without re-defining it in each. |
i am also looking at putting in a batch or progress storage to get around the 6 minute / 30 minute execution limits. |
Agreed script execution timeout issue needs a fix. I couldn't come up with an elegant solution. |
only way i can see is to put in a file structure (probably json or something) and record all the file and folder IDs as it progresses. after it hit the end of the source folder it would then have to go in and delete the triggers to keep it from repeating itself unprompted. the total time to copy everything would increase but since we would be bypassing the execution limit it doesn't really matter. |
It's a lot of complexity to get around a limit that Google just needs to remove or adjust. |
There are some uglier hacks that could be done just to break the folder structure up into separate jobs. It would be imperfect but simpler. |
ya i agree but this way is the most fool proof that i can see, and with how "fast" google changes service limits like that the only way that somewhat future proofs it by not relying on more gscript functions; i don't think they will ever touch or remove the baseline functions of the file I/O subsystem. it's definitely a PITA to setup but it covers everything. |
update script to include the following: