Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions changedetectionio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from changedetectionio.flask_app import changedetection_app
from loguru import logger


# Only global so we can access it in the signal handler
app = None
datastore = None
Expand All @@ -29,8 +28,6 @@ def get_version():

# Parent wrapper or OS sends us a SIGTERM/SIGINT, do everything required for a clean shutdown
def sigshutdown_handler(_signo, _stack_frame):
global app
global datastore
name = signal.Signals(_signo).name
logger.critical(f'Shutdown: Got Signal - {name} ({_signo}), Saving DB to disk and calling shutdown')
datastore.sync_to_json()
Expand Down
6 changes: 0 additions & 6 deletions changedetectionio/blueprint/browser_steps/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
browsersteps_sessions = {}
io_interface_context = None
import json
import base64
import hashlib
from flask import Response

Expand All @@ -34,10 +33,8 @@ def start_browsersteps_session(watch_uuid):
from . import nonContext
from . import browser_steps
import time
global browsersteps_sessions
global io_interface_context


# We keep the playwright session open for many minutes
keepalive_seconds = int(os.getenv('BROWSERSTEPS_MINUTES_KEEPALIVE', 10)) * 60

Expand Down Expand Up @@ -104,8 +101,6 @@ def browsersteps_start_session():
# A new session was requested, return sessionID

import uuid
global browsersteps_sessions

browsersteps_session_id = str(uuid.uuid4())
watch_uuid = request.args.get('uuid')

Expand Down Expand Up @@ -149,7 +144,6 @@ def browser_steps_fetch_screenshot_image():
def browsersteps_ui_update():
import base64
import playwright._impl._errors
global browsersteps_sessions
from changedetectionio.blueprint.browser_steps import browser_steps

remaining =0
Expand Down
3 changes: 0 additions & 3 deletions changedetectionio/tests/smtp/test_notification_smtp.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def test_setup(live_server):

def get_last_message_from_smtp_server():
import socket
global smtp_test_server
port = 11080 # socket server port number

client_socket = socket.socket() # instantiate
Expand All @@ -44,7 +43,6 @@ def test_check_notification_email_formats_default_HTML(client, live_server, meas
# live_server_setup(live_server)
set_original_response()

global smtp_test_server
notification_url = f'mailto://changedetection@{smtp_test_server}:11025/?to=fff@home.com'

#####################
Expand Down Expand Up @@ -99,7 +97,6 @@ def test_check_notification_email_formats_default_Text_override_HTML(client, liv
# https://github.com/caronc/apprise/issues/633

set_original_response()
global smtp_test_server
notification_url = f'mailto://changedetection@{smtp_test_server}:11025/?to=fff@home.com'
notification_body = f"""<!DOCTYPE html>
<html lang="en">
Expand Down