Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
reflectometry
django-remote-submission
Commits
4b790c0b
Commit
4b790c0b
authored
Apr 10, 2022
by
Jose Borreguero
Browse files
modify mock task
Signed-off-by:
Jose Borreguero
<
borreguero@gmail.com
>
parent
8ba917b2
Pipeline
#201373
passed with stages
in 5 minutes and 47 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
django_remote_submission/tasks.py
View file @
4b790c0b
...
...
@@ -21,6 +21,9 @@ from .models import Job, Log, Result
from
.wrapper.local
import
LocalWrapper
from
.wrapper.remote
import
RemoteWrapper
# standard imports
from
datetime
import
datetime
logger
=
get_task_logger
(
__name__
)
...
...
@@ -449,5 +452,8 @@ def delete_key_from_server(
@
shared_task
def
clean_expired_sessions
():
r
"""Print a silly message"""
print
(
"DEBUG: clean_expired_sessions"
)
# print to celery's log file /var/log/celery.log
open
(
"/tmp/clean_expired_sessions.log"
,
"a"
).
write
(
"DEBUG: clean_expired_sessions
\n
"
)
current_time
=
datetime
.
now
().
strftime
(
"%H:%M:%S"
)
print
(
f
"DEBUG: Task clean_expired_sessions executed at
{
current_time
}
"
)
# print to celery's log file /var/log/celery.log
return
None
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