Skip to content

Commit

Permalink
Update main branch with fix (#137)
Browse files Browse the repository at this point in the history
* ci on develop (#134)

* update develop tour (#135)

* fix args (#136)
  • Loading branch information
MateoLostanlen authored Oct 11, 2022
1 parent faa0dfd commit fe82a48
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: tests-RPI

on:
push:
branches: main
branches: [main, develop]
pull_request:
branches: main
branches: [main, develop]

jobs:
build:
Expand Down
19 changes: 19 additions & 0 deletions scripts/update_script_develop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
# This script performs:
# pull origin main
#- if any change:
# kill container
# rebuild docker compose
#
# This script must be run with a crontab, run every hour
# 0 * * * * bash /home/pi/pyro-engine/scripts/update_script.sh


if [ `git -C /home/pi/pyro-engine pull origin develop | grep -c "up to date."` -ne 1 ];
then
echo "pyro-engine up to date";
else
echo "pyro-engine updated from github";
make -C /home/pi/pyro-engine stop
make -C /home/pi/pyro-engine run
fi;
2 changes: 1 addition & 1 deletion src/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def main(args):
parser.add_argument("--creds", type=str, default="data/credentials.json", help="Camera credentials")
parser.add_argument("--cache", type=str, default="./data", help="Cache folder")
# Backup
parser.add_argument("--cache", type=int, default=30, help="Number of days before local backup is delete")
parser.add_argument("--backup-size", type=int, default=30, help="Number of days before local backup is delete")
# Time config
parser.add_argument("--period", type=int, default=30, help="Number of seconds between each camera stream analysis")
parser.add_argument("--save-period", type=int, default=3600, help="Number of seconds between each media save")
Expand Down

0 comments on commit fe82a48

Please sign in to comment.