Skip to content

Conversation

@GuillaumeDSM
Copy link
Member

No description provided.

@GuillaumeDSM GuillaumeDSM self-assigned this Jan 13, 2026
Copy link
Member

@Herklos Herklos left a comment

Choose a reason for hiding this comment

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

👍

assert task_result == expected_result
if encrypted_result:
assert isinstance(json.loads(result[octobot_node.app.enums.TaskResultKeys.METADATA.value]), dict)
assert result[octobot_node.app.enums.TaskResultKeys.METADATA.value]
Copy link
Member

Choose a reason for hiding this comment

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

Nice tests!

Comment on lines +71 to +80
next_execution_time = next_actions_description.get_next_execution_time()
now_time = time.time()
if next_execution_time == 0 or next_execution_time < now_time:
delay = 0
else:
next_execution_time = datetime.datetime.fromtimestamp(
next_actions_description.get_next_execution_time(),
tz=datetime.timezone.utc
)
execute_octobot.schedule(args=[task], eta=next_execution_time)
delay = next_execution_time - now_time
logging.getLogger("octobot_node.scheduler.tasks").info(
f"Scheduling task '{task.name}' for execution in {delay} seconds"
)
return execute_octobot.schedule(args=[task], delay=delay)
Copy link
Member

Choose a reason for hiding this comment

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

👍

Comment on lines 55 to 58
elif settings.USE_MEMORY_SCHEDULER:
# warning: this mode has no persistence, tasks will be lost when the process is stopped
self.logger.info("Initializing scheduler with memory backend")
self.INSTANCE = MemoryHuey(DEFAULT_NAME)
Copy link
Member

Choose a reason for hiding this comment

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

I think we could use something like an init arg or class global variable to set this value if users shouldn't use it

Copy link
Member Author

Choose a reason for hiding this comment

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

It's now disabled, we now use sqlitehuey in tests

Copy link
Member

@Herklos Herklos left a comment

Choose a reason for hiding this comment

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

👍

@GuillaumeDSM GuillaumeDSM merged commit 31ac941 into master Jan 13, 2026
5 checks passed
@GuillaumeDSM GuillaumeDSM deleted the demo branch January 13, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants