Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/harmony cron #82

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Feat/harmony cron #82

wants to merge 10 commits into from

Conversation

snadrus
Copy link
Contributor

@snadrus snadrus commented Jul 10, 2024

Cron offers At() which schedules a task to be made that associates itself with an arbitrary table.
This is an unprivileged task: any task can do this.
Usage:
Fill your custom table with the custom values that matter to you. (returning rowID)
It should have an 'id' and 'task_id' column

deps.At(
time.Now().Add(3 * time.Hour),
"FooTask",
"tableFoo",
rowID)

2 fragile points:

  1. it adds to harmony_task which beforehand only harmonytask did.
  2. It required a PLSQL func to avoid the sqlInjection system complaining about an arbitrary table.

@snadrus snadrus requested a review from magik6k July 10, 2024 05:05
@snadrus snadrus marked this pull request as draft July 11, 2024 22:27
@snadrus snadrus marked this pull request as ready for review July 11, 2024 22:27
@snadrus snadrus marked this pull request as draft July 11, 2024 22:32
@snadrus
Copy link
Contributor Author

snadrus commented Jul 11, 2024

Question for reviewer:
We currently take this low-effort work on all machines. Should we change CanAccept() to be pickier, or is it just not worth the hassle?

@snadrus snadrus marked this pull request as ready for review July 11, 2024 22:34
@snadrus snadrus requested a review from LexLuthr July 11, 2024 22:35
@snadrus
Copy link
Contributor Author

snadrus commented Jul 14, 2024

This needs a DB-based unit test. We should hold until we have that framework up.

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.

1 participant