Page Menu
Home
Search
Configure Global Search
Log In
Files
F13114773
tasks.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
416 B
Subscribers
None
tasks.py
View Options
import
logging
import
typing
from
pillar
import
current_app
log
=
logging
.
getLogger
(
__name__
)
@current_app.celery.task
(
track_started
=
True
)
def
long_task
(
numbers
:
typing
.
List
[
int
]):
_log
=
log
.
getChild
(
'long_task'
)
_log
.
info
(
'Computing sum of
%i
items'
,
len
(
numbers
))
import
time
time
.
sleep
(
6
)
thesum
=
sum
(
numbers
)
_log
.
info
(
'Computed sum of
%i
items'
,
len
(
numbers
))
return
thesum
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Sun, May 29, 4:09 PM (2 d)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
fd/79/e5794ffc074bbe877fe442fbe754
Attached To
rPS Pillar
Event Timeline
Log In to Comment