Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cognite/extractorutils/unstable/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def my_task_function(self, task_context: TaskContext) -> None:
import logging
import time
from concurrent.futures import ThreadPoolExecutor
from datetime import datetime, timezone
from functools import partial
from logging.handlers import TimedRotatingFileHandler
from multiprocessing import Queue
Expand Down Expand Up @@ -146,6 +147,7 @@ def __init__(self, config: FullConfig[ConfigType]) -> None:
self._tasks: list[Task] = []
self._task_updates: list[TaskUpdate] = []
self._errors: dict[str, Error] = {}
self._start_time: datetime

self.__init_tasks__()

Expand Down Expand Up @@ -435,6 +437,7 @@ def run(self) -> None:
with extractor:
extractor.run()
"""
self._start_time = datetime.now(tz=timezone.utc)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice to set it to UTC! Have had a ton of problems correlating when the customer has some funky timezones in use when running on their systems. Very confusing.

has_scheduled = False

startup: list[StartupTask] = []
Expand Down
Loading