Skip to content

Commit

Permalink
Release 7.0.2 - See CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tiredofit committed Jan 10, 2023
1 parent 2c79226 commit faeb60f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 7.0.2 2023-01-10 <dave at tiredofit dot ca>

### Changed
- Handle Ctrl C better
- Exit if Docker Errors during while loop


## 7.0.1 2023-01-10 <dave at tiredofit dot ca>

### Changed
Expand Down
9 changes: 9 additions & 0 deletions install/usr/sbin/cloudflare-companion
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ from logging import handlers
import os
import re
import requests
import signal
import sys
import time
import threading
Expand All @@ -30,6 +31,12 @@ TRAEFIK_POLL_SECONDS = int(os.environ.get('TRAEFIK_POLL_SECONDS', "60"))
TRAEFIK_POLL_URL = os.environ.get('TRAEFIK_POLL_URL', None)
TRAEFIK_VERSION = os.environ.get('TRAEFIK_VERSION', "2")

# Handle Ctrl C
def signal_handler(signal, frame):
sys.exit(0)

signal.signal(signal.SIGINT, signal_handler)

# set up logging
logger = logging.getLogger(__name__)
DEBUG = False
Expand Down Expand Up @@ -531,6 +538,7 @@ while (forever < 777):
add_to_mappings(new_mappings, check_service_t2(client.services.get(event.get(u'id'))))

except docker.errors.NotFound as e:
forever=778
pass

if DOCKER_SWARM_MODE:
Expand All @@ -547,6 +555,7 @@ while (forever < 777):
add_to_mappings(new_mappings, check_service_t2(node_id))

except docker.errors.NotFound as e:
forever=778
pass

sync_mappings(new_mappings, doms)

0 comments on commit faeb60f

Please sign in to comment.