mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
## What changed? - Added an RPC service to the CHASM Scheduler which implements its CRUD operations. - The intention is for the frontend handler to attempt to route to CHASM operations in history, and in the event of a not-found, let frontend retry its old (V1 scheduler) path. - These assume frontend's validation. As we move towards ripping out the old scheduler code, we'll start moving all of that existing logic over into the CHASM world, but for now, let's keep it as-is for as light a possible touch on existing paths. - This is based on `standalone-activity` just to get the API boilerplate stuff.
31 lines
772 B
Go
31 lines
772 B
Go
package scheduler
|
|
|
|
import (
|
|
"go.temporal.io/server/chasm"
|
|
legacyscheduler "go.temporal.io/server/service/worker/scheduler"
|
|
"go.uber.org/fx"
|
|
)
|
|
|
|
func Register(
|
|
registry *chasm.Registry,
|
|
library *Library,
|
|
) error {
|
|
return registry.Register(library)
|
|
}
|
|
|
|
var Module = fx.Module(
|
|
"chasm.lib.scheduler",
|
|
fx.Provide(ConfigProvider),
|
|
fx.Provide(legacyscheduler.NewSpecBuilder),
|
|
fx.Provide(NewSpecProcessor),
|
|
fx.Provide(func(impl *SpecProcessorImpl) SpecProcessor { return impl }),
|
|
fx.Provide(newHandler),
|
|
fx.Provide(NewSchedulerIdleTaskExecutor),
|
|
fx.Provide(NewGeneratorTaskExecutor),
|
|
fx.Provide(NewInvokerExecuteTaskExecutor),
|
|
fx.Provide(NewInvokerProcessBufferTaskExecutor),
|
|
fx.Provide(NewBackfillerTaskExecutor),
|
|
fx.Provide(NewLibrary),
|
|
fx.Invoke(Register),
|
|
)
|