Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
50e66336
authored
Apr 18, 2013
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
one: fix |timeuntil in mails/notification-*.txt
parent
9cbc7776
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
+3
-2
one/jobs/hourly/scheduled_vm_cleanup.py
+1
-0
one/templates/mails/notification-delete.txt
+1
-1
one/templates/mails/notification-suspend.txt
+1
-1
No files found.
one/jobs/hourly/scheduled_vm_cleanup.py
View file @
50e66336
...
@@ -38,6 +38,7 @@ class Job(HourlyJob):
...
@@ -38,6 +38,7 @@ class Job(HourlyJob):
pass
pass
# print u'%s delete: %s' % (i.name, i.time_of_delete)
# print u'%s delete: %s' % (i.name, i.time_of_delete)
delete
=
i
.
time_of_delete
.
replace
(
minute
=
0
,
second
=
0
,
microsecond
=
0
)
delete
=
i
.
time_of_delete
.
replace
(
minute
=
0
,
second
=
0
,
microsecond
=
0
)
if
not
settings
.
DELETE_VM
:
continue
continue
if
i
.
time_of_delete
<
now
:
if
i
.
time_of_delete
<
now
:
msg
=
render_to_string
(
'mails/notification-delete-now.txt'
,
msg
=
render_to_string
(
'mails/notification-delete-now.txt'
,
...
...
one/templates/mails/notification-delete.txt
View file @
50e66336
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
{% block body %}
{% block body %}
{% blocktrans with vm=instance.name state=instance.state|lower date=instance.time_of_delete time=
exp
|timeuntil %}
{% blocktrans with vm=instance.name state=instance.state|lower date=instance.time_of_delete time=
instance.time_of_delete
|timeuntil %}
Your {{state}} virtual machine "{{vm}}" is going to be DELETED
Your {{state}} virtual machine "{{vm}}" is going to be DELETED
at {{date}} (in {{time}}).
at {{date}} (in {{time}}).
{% endblocktrans %}
{% endblocktrans %}
...
...
one/templates/mails/notification-suspend.txt
View file @
50e66336
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
{% block body %}
{% block body %}
{% blocktrans with vm=instance.name state=instance.state|lower date=instance.time_of_suspend time=
exp
|timeuntil url=url %}
{% blocktrans with vm=instance.name state=instance.state|lower date=instance.time_of_suspend time=
instance.time_of_suspend
|timeuntil url=url %}
Your {{state}} virtual machine "{{vm}}" is going to be STOPPED
Your {{state}} virtual machine "{{vm}}" is going to be STOPPED
at {{date}} (in {{time}}).
at {{date}} (in {{time}}).
{% endblocktrans %}
{% endblocktrans %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment