comparison serve.bash @ 41:d129c3d0e920 draft default tip

planemo upload for repository https://github.com/richard-burhans/galaxytools/tree/main/tools/ncbi_egapx commit 8278322cb9db499c593669d2bb8b740024ecf5dc
author richard-burhans
date Mon, 28 Jul 2025 14:35:28 +0000
parents
children
comparison
equal deleted inserted replaced
40:b095c69eab5b 41:d129c3d0e920
1 #!/usr/bin/env bash
2
3 set -o errexit
4 set -o nounset
5 set -o pipefail
6 #set -o xtrace
7
8 export TMP=/scratch/rico/tmp
9
10 #source "/scratch/rico/new/env.bash"
11
12 export PLANEMO_GLOBAL_WORKSPACE=/scratch/rico/planemo
13 export PLANEMO_GLOBAL_CONFIG_PATH=${PLANEMO_GLOBAL_WORKSPACE}/.planemo.yml
14 CLEAN=0
15 CLEAN=1
16
17 if [ -e "/scratch/rico/galaxy" ]; then
18 z_time=$(stat --format="%Z" "/scratch/rico/galaxy")
19
20 w_time=$(stat --format="%W" "/scratch/rico/galaxy")
21 if [ $w_time -ne 0 ]; then
22 if [ $w_time -lt $z_time ]; then
23 z_time="$w_time"
24 fi
25 fi
26
27 now=$(date +%s)
28 delta=$(( now - z_time ))
29 if [ $delta -ge 86400 ]; then
30 CLEAN=1
31 fi
32 else
33 CLEAN=1
34 fi
35
36 if [ $CLEAN -ne 0 ]; then
37 rm -rf /scratch/rico/galaxy
38 rm -rf "$PLANEMO_GLOBAL_WORKSPACE"
39 rm -rf /scratch/rico/.npm
40 mkdir /scratch/rico/.npm
41 fi
42
43 rm -rf /tmp/tmp* "$TMP/tmp*"
44
45 export GALAXY_SLOTS=64
46 export GALAXY_MEMORY_MB=262144
47
48 if [ $CLEAN -ne 0 ]; then
49 planemo serve \
50 --galaxy_root /scratch/rico/galaxy \
51 --docker \
52 --no_docker_sudo \
53 --no_cleanup \
54 2>&1 \
55 | tee serve.out
56 else
57 planemo serve \
58 --galaxy_root /scratch/rico/galaxy \
59 --docker \
60 --no_docker_sudo \
61 --skip_client_build \
62 --no_cleanup \
63 2>&1 \
64 | tee serve.out
65 fi
66
67 # Galaxy upload tool fails when using planemo server on galaxy release branch 24
68 #
69 # rm -rf /scratch/rico/galaxy; planemo serve --galaxy_branch release_23.2 --galaxy_root /scratch/rico/galaxy
70 # rm -rf /scratch/rico/galaxy; planemo serve --galaxy_branch release_24.0 --galaxy_root /scratch/rico/galaxy
71
72