Skip to content

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.

@LexLuthr
Copy link
Contributor

Closing this as we decided not to pursue this based on complexity and limited use case from users.

@LexLuthr LexLuthr closed this Apr 18, 2025
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