Skip to content

Commit

Permalink
use same term for compressed events (accumulated events that are coun…
Browse files Browse the repository at this point in the history
…ted as one durable event)
  • Loading branch information
Oleg Valiulin committed Dec 30, 2024
1 parent 4e85a11 commit e05df30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cvat/apps/events/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
MAX_EVENT_DURATION = datetime.timedelta(seconds=100)
WORKING_TIME_RESOLUTION = datetime.timedelta(milliseconds=1)
WORKING_TIME_SCOPE = 'send:working_time'
COLLAPSED_EVENT_SCOPES = frozenset(("change:frame",))
COMPRESSED_EVENT_SCOPES = frozenset(("change:frame",))
4 changes: 2 additions & 2 deletions cvat/apps/events/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import datetime


from .const import MAX_EVENT_DURATION, COLLAPSED_EVENT_SCOPES
from .const import MAX_EVENT_DURATION, COMPRESSED_EVENT_SCOPES
from .cache import clear_cache


Expand Down Expand Up @@ -71,7 +71,7 @@ def wrap(self, *args, **kwargs):


def get_end_timestamp(event: dict) -> datetime.datetime:
if event["scope"] in COLLAPSED_EVENT_SCOPES:
if event["scope"] in COMPRESSED_EVENT_SCOPES:
return event["timestamp"] + datetime.timedelta(milliseconds=event["duration"])
return event["timestamp"]

Expand Down

0 comments on commit e05df30

Please sign in to comment.