mirror of
https://github.com/syumai/workers.git
synced 2025-03-10 17:29:11 +00:00
Merge pull request #130 from ben-krieger/schedule-task-non-block
Support HTTP Request and Cron Trigger in Single Worker
This commit is contained in:
commit
6e29c1e9e5
@ -55,3 +55,7 @@ func ScheduleTask(task Task) {
|
|||||||
ready()
|
ready()
|
||||||
select {}
|
select {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ScheduleTaskNonBlock sets the Task to be executed but does not signal readiness or block
|
||||||
|
// indefinitely. The non-blocking form is meant to be used in conjunction with [workers.Serve].
|
||||||
|
func ScheduleTaskNonBlock(task Task) { scheduledTask = task }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user