Page Menu
Home
Search
Configure Global Search
Log In
Files
F13091440
badges.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
645 B
Subscribers
None
badges.py
View Options
"""Badge HTML synchronisation.
Note that this module can only be imported when an application context is
active. Best to late-import this in the functions where it's needed.
"""
import
datetime
import
logging
from
pillar
import
current_app
,
badge_sync
log
=
logging
.
getLogger
(
__name__
)
@current_app.celery.task
(
ignore_result
=
True
)
def
sync_badges_for_users
(
timelimit_seconds
:
int
):
"""Synchronises Blender ID badges for the most-urgent users."""
timelimit
=
datetime
.
timedelta
(
seconds
=
timelimit_seconds
)
log
.
info
(
'Refreshing badges, timelimit is
%s
(H:MM:SS)'
,
timelimit
)
badge_sync
.
refresh_all_badges
(
timelimit
=
timelimit
)
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Sat, May 21, 8:39 PM (2 d)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
98/f9/6ac72071284eca2a03de8d9521cc
Attached To
rPS Pillar
Event Timeline
Log In to Comment