forked from ppfun/pixelplanet
fix last commit
This commit is contained in:
parent
b839866aea
commit
241ed14117
|
@ -16,7 +16,7 @@ async function history(req: Request, res: Response) {
|
||||||
res.status(404).end();
|
res.status(404).end();
|
||||||
}
|
}
|
||||||
const yyyy = day.slice(0, 4);
|
const yyyy = day.slice(0, 4);
|
||||||
const mm = day.slice(4, 2);
|
const mm = day.slice(4, 6);
|
||||||
const dd = day.slice(6);
|
const dd = day.slice(6);
|
||||||
const path = `${BACKUP_DIR}/${yyyy}/${mm}/${dd}/${id}`;
|
const path = `${BACKUP_DIR}/${yyyy}/${mm}/${dd}/${id}`;
|
||||||
|
|
||||||
|
|
|
@ -255,7 +255,7 @@ class ChunkLoader {
|
||||||
|
|
||||||
const center = [historicalCanvasMaxTiledZoom, cx, cy];
|
const center = [historicalCanvasMaxTiledZoom, cx, cy];
|
||||||
// eslint-disable-next-line max-len
|
// eslint-disable-next-line max-len
|
||||||
let url = `${window.ssv.backupurl}/${historicalDate.slice(0, 4)}/${historicalDate.slice(4, 2)}/${historicalDate.slice(6)}/`;
|
let url = `${window.ssv.backupurl}/${historicalDate.slice(0, 4)}/${historicalDate.slice(4, 6)}/${historicalDate.slice(6)}/`;
|
||||||
if (historicalTime) {
|
if (historicalTime) {
|
||||||
// incremential tiles
|
// incremential tiles
|
||||||
url += `${canvasId}/${historicalTime}/${cx}/${cy}.png`;
|
url += `${canvasId}/${historicalTime}/${cx}/${cy}.png`;
|
||||||
|
|
|
@ -7,11 +7,10 @@ DATE_YESTERDAY=`printf "%(%Y/%m/%d)T" $(( $(printf "%(%s)T" -1) - 24*3600 ))`
|
||||||
#delete older daily backup folders from local filesystem if exist
|
#delete older daily backup folders from local filesystem if exist
|
||||||
if [ -d "${TMPDIR}/${DATE_YESTERDAY}" ]
|
if [ -d "${TMPDIR}/${DATE_YESTERDAY}" ]
|
||||||
then
|
then
|
||||||
|
echo "Deleting past day from tmp-folder ${DATE_YESTERDAY}"
|
||||||
rm -rf "${TMPDIR}/${DATE_YESTERDAY}"
|
rm -rf "${TMPDIR}/${DATE_YESTERDAY}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit
|
|
||||||
|
|
||||||
rsync -r ${TMPDIR}/ backup@ayylmao:/backup/pixelplanet/canvas
|
rsync -r ${TMPDIR}/ backup@ayylmao:/backup/pixelplanet/canvas
|
||||||
|
|
||||||
#clear current daily folder
|
#clear current daily folder
|
||||||
|
|
Loading…
Reference in New Issue
Block a user