From be8f0839e435f3f6f68858b7cc0e87c99a669d75 Mon Sep 17 00:00:00 2001 From: Mentor Date: Mon, 13 Jun 2022 09:15:21 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20script=20update=20and=20memory=20in?= =?UTF-8?q?crease=20for=20notifier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- functions/index.js | 2 +- package.json | 2 +- scripts/backup-images.zsh | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/functions/index.js b/functions/index.js index 35f4113..7a211ea 100644 --- a/functions/index.js +++ b/functions/index.js @@ -25,4 +25,4 @@ exports.rinkebyGenerateOutfitsOnQueue = functions.runWith( runtime ).firestore.d // Daemons // /////////////////////////////*/ const { notify_holders_of_changing_room_updates } = require( './integrations/changingroom' ) -exports.notify_holders_of_changing_room_updates = functions.pubsub.schedule( '0 0 * * *' ).onRun( notify_holders_of_changing_room_updates ) \ No newline at end of file +exports.notify_holders_of_changing_room_updates = functions.runWith( runtime ).pubsub.schedule( '0 0 * * *' ).onRun( notify_holders_of_changing_room_updates ) \ No newline at end of file diff --git a/package.json b/package.json index 53eea29..7415c2b 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "backup": "zsh ./scripts/backup-images.zsh" + "backup": "caffeinate zsh ./scripts/backup-images.zsh" }, "author": "Mentor Palokaj (http://github.com/actuallymentor)", "license": "MIT", diff --git a/scripts/backup-images.zsh b/scripts/backup-images.zsh index b522ee6..c5c15d8 100644 --- a/scripts/backup-images.zsh +++ b/scripts/backup-images.zsh @@ -3,12 +3,14 @@ ## I intend to make this an online thing ## But the storage cost is a bit expensive ## ############### +brew update +brew install pigz timestamp=$( date ) cd .backups && \ gcloud config set project rocketeer-nft && \ gsutil -m cp -r gs://rocketeer-nft.appspot.com/mainnetRocketeers/ ./rocketeer-image-backups/ && \ -tar -cv rocketeer-image-backups | gzip -9 > rocketeer-backup-$timestamp.tar.gz && \ -mv rocketeer-backup-$timestamp.tar.gz ~/Google\ Drive/Backup/Rocketeers/ -echo "✅ success" || echo "🛑 fail" +tar -cv rocketeer-image-backups | pigz -9 > rocketeer-backup-$timestamp.tar.gz && \ +cp rocketeer-backup-$timestamp.tar.gz ~/Google\ Drive/My\ Drive/Backup/Rocketeers/ && \ +echo "✅ $(date) success" || echo "🛑 $(date) fail" say "Backup process done"