FAQ
| This is a
LIVE
service |
Changelog
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ews-coordinator
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gilligan Lab for Epidemiology and Modelling
Wheat rusts
ews-coordinator
Commits
987428eb
Commit
987428eb
authored
7 months ago
by
L. Bower
Browse files
Options
Downloads
Patches
Plain Diff
adding regional forecast images to the advisory
parent
04c70e93
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ews/coordinator/processor_base.py
+6
-6
6 additions, 6 deletions
ews/coordinator/processor_base.py
with
6 additions
and
6 deletions
ews/coordinator/processor_base.py
+
6
−
6
View file @
987428eb
...
...
@@ -46,8 +46,8 @@ class ProcessorBase:
def
__init__
(
self
)
->
None
:
super
().
__init__
()
time_now
=
datetime
.
datetime
.
today
()
self
.
today
S
tring
=
time_now
.
strftime
(
'
%Y%m%d
'
)
self
.
now
S
tring
=
time_now
.
strftime
(
'
%Y%m%d-%H%M-%S
'
)
self
.
today
_s
tring
=
time_now
.
strftime
(
'
%Y%m%d
'
)
self
.
now
_s
tring
=
time_now
.
strftime
(
'
%Y%m%d-%H%M-%S
'
)
def
parse_and_check_args
(
self
)
->
dict
:
...
...
@@ -99,7 +99,7 @@ class ProcessorBase:
'
-d
'
,
'
--run-date
'
,
metavar
=
'
YYYYMMDD
'
,
action
=
'
store
'
,
default
=
self
.
today
S
tring
,
default
=
self
.
today
_s
tring
,
help
=
'
Initial day of calculation, starting at 00 UTC (Default is today)
'
,
dest
=
'
start_date
'
,
)
...
...
@@ -129,11 +129,11 @@ class ProcessorBase:
raise
RuntimeError
# check the startstring
if
args
.
start_date
is
not
self
.
today
S
tring
:
if
args
.
start_date
is
not
self
.
today
_s
tring
:
try
:
# check date string is formatted correctly
provided_start_date
=
datetime
.
datetime
.
strptime
(
args
.
start_date
,
'
%Y%m%d
'
)
today_date
=
datetime
.
datetime
.
strptime
(
self
.
today
S
tring
,
'
%Y%m%d
'
)
today_date
=
datetime
.
datetime
.
strptime
(
self
.
today
_s
tring
,
'
%Y%m%d
'
)
# early limit is quite arbitrary, but this is earliest year of available survey data for Ethiopia
date_limit_early
=
datetime
.
datetime
.
strptime
(
'
20070101
'
,
'
%Y%m%d
'
)
...
...
@@ -198,7 +198,7 @@ class ProcessorBase:
:return:
"""
if
os
.
path
.
exists
(
job_path
):
archived_dir_path
=
f
"
{
job_path
}
-ARCHIVE_
{
self
.
now
S
tring
}
"
archived_dir_path
=
f
"
{
job_path
}
-ARCHIVE_
{
self
.
now
_s
tring
}
"
message
=
f
"
Job path
{
job_path
}
already exists, so moving it to
{
archived_dir_path
}
"
print
(
message
)
os
.
rename
(
job_path
,
archived_dir_path
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment