Skip to content

Commit

Permalink
Merge branch 'main' of github.com:EVS-GIS/woodcam-rm
Browse files Browse the repository at this point in the history
  • Loading branch information
sdunesme committed Jan 9, 2024
2 parents ab2a755 + 447aeec commit 216c5a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='woodcamrm',
version='1.0.1',
version='1.0.2',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
Expand All @@ -16,6 +16,7 @@
'flask_httpauth==4.7.0',
'flask-restx==0.5.1',
'flask-sqlalchemy==2.5.1',
'sqlalchemy==1.4.46',
'flask-apscheduler==1.12.4',
'flask-mail==0.9.1',
'flask-wtf==1.0.1',
Expand Down
4 changes: 2 additions & 2 deletions woodcamrm/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,11 @@ def records_check():
for clip in old_clips:
os.remove(clip)

# Remove archive clips older than 1hour
# Remove archive clips older than 30min
archives_dir = os.path.join(st.storage_path, 'archives')
if os.path.isdir(archives_dir):
old_clips = [os.path.join(archives_dir, f) for f in os.listdir(archives_dir)
if time.time() - os.stat(os.path.join(archives_dir, f)).st_mtime >= (60*60)
if time.time() - os.stat(os.path.join(archives_dir, f)).st_mtime >= (60*30)
and not os.path.isdir(os.path.join(archives_dir, f))]

for clip in old_clips:
Expand Down

0 comments on commit 216c5a5

Please sign in to comment.