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 date object is None error. #731 #773

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions plotmanager/library/utilities/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ def monitor_jobs_to_start(jobs, running_work, max_concurrent, max_for_phase_1, n
except (KeyError, AttributeError):
start_early_date = work.datetime_start

if start_early_date is None:
continue
if work.current_phase < job.concurrency_start_early_phase:
continue
if datetime.now() <= (start_early_date + timedelta(minutes=job.concurrency_start_early_phase_delay)):
Expand Down
5 changes: 4 additions & 1 deletion plotmanager/library/utilities/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ def _get_date_summary(analysis):
if analysis['files'][file_path]['checked']:
continue
analysis['files'][file_path]['checked'] = True
end_date = analysis['files'][file_path]['data']['date'].date()
if analysis['files'][file_path]['data']['date'] is None:
end_date = datetime.now()
else:
end_date = analysis['files'][file_path]['data']['date'].date()
if end_date not in summary:
summary[end_date] = 0
summary[end_date] += 1
Expand Down