Skip to content

Commit

Permalink
Use container_id script when execing
Browse files Browse the repository at this point in the history
  • Loading branch information
mfisher87 committed Sep 28, 2021
1 parent 45c78f0 commit 5a8d8cf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions scripts/dev_run_task.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
#!/bin/bash

THIS_DIR="$( readlink -f "$( dirname "${BASH_SOURCE[0]}" )")"
container_id="$($THIS_DIR/helpers/container_id.sh)"

# Run the cleanup script if the user passes any arguments. Convenient to do
# everything in one step.
if [ -n "$1" ]; then
echo "🧹Doing cleanup..."
THIS_DIR="$( readlink -f "$( dirname "${BASH_SOURCE[0]}" )")"
"$THIS_DIR"/cleanup.sh "$@"
echo "🧹Cleanup done!"
fi


# Skip zipping the package because in dev we typically want to examine
# the results.
docker-compose exec luigi luigi --workers=1 \
docker exec -it ${container_id} luigi --workers=1 \
--module qgreenland.tasks.main CreateQgisProjectFile
6 changes: 4 additions & 2 deletions scripts/run_task.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/bin/bash
set -e

THIS_DIR="$( readlink -f "$( dirname "${BASH_SOURCE[0]}" )")"
container_id="$($THIS_DIR/helpers/container_id.sh)"

# TODO: --workers=$(nproc) (or more?)
# Currently hardcoded to 1 because increasing number of workers leads to failures:
#
Expand All @@ -21,6 +24,5 @@ fi
# removed/commented for prod.
# docker-compose up -d
# NOTE: Workers must be set to 1 for python debug breakpoints to be usable
docker-compose exec ${tty_arg} luigi luigi --workers=1 \
docker exec -it ${tty_arg} ${container_id} luigi --workers=1 \
--module qgreenland.tasks.main ZipQGreenland
# docker-compose down

0 comments on commit 5a8d8cf

Please sign in to comment.