Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 138 #139

Merged
merged 6 commits into from
Sep 4, 2024
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
8 changes: 4 additions & 4 deletions .github/workflows/build_windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:

steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: robinraju/release-downloader@v1.8
- uses: robinraju/release-downloader@v1.10
with:
repository: "MerginMaps/geodiff"
latest: true
Expand All @@ -26,7 +26,7 @@ jobs:
cd scripts/windows_binaries
del geodiff_*.zip

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'

Expand All @@ -44,7 +44,7 @@ jobs:
run: copy config.yaml.default scripts/dist/config.yaml

- name: Upload Zip file as artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dbsync_standalone_win
path: scripts/dist
1 change: 0 additions & 1 deletion .github/workflows/tests_mergin_db_sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ jobs:
python3 -m pip install -r requirements.txt
python3 -m pip install -r requirements-dev.txt


- name: Run tests
run: |
pytest test --cov=. --cov-report=term-missing:skip-covered -vv
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.1.2

- Fix datetime.timedelta comparison to seconds

## 2.1.1

- Fix failure to start when notifications were not enabled
Expand Down
5 changes: 4 additions & 1 deletion dbsync_daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ def main():
else:
min_time_delta_hr = 4

if last_email_sent is None or (datetime.datetime.now() - last_email_sent) > min_time_delta_hr * 3600:
if (
last_email_sent is None
or (datetime.datetime.now() - last_email_sent).total_seconds() > min_time_delta_hr * 3600
):
send_email(str(e), config)
last_email_sent = datetime.datetime.now()

Expand Down
2 changes: 1 addition & 1 deletion test/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

License: MIT
"""

import pytest

from config import ConfigError, config, get_ignored_tables, validate_config
Expand Down Expand Up @@ -254,7 +255,6 @@ def test_get_ignored_tables():
def test_config_notification_setup():
_reset_config()

# no NOTIFICATIONS set should pass but cannot send email
validate_config(config)

# incomplete setting
Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.1.1"
__version__ = "2.1.2"
Loading