mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-11 01:36:37 +08:00
feat(core): bind request services and implement registered tasks
Wire plugin services through Bind/InjectFrom and AppContext so HTTP and workers resolve dependencies after Apply. Register TaskHandler objects with persisted results, and implement send_email_code, mail:send, cleanup_inactive_users, and dispatch_bot_msg.
This commit is contained in:
@@ -236,7 +236,7 @@ func TestUserPlugin(t *testing.T) {
|
||||
assert.Len(t, list, 1)
|
||||
assert.Equal(t, "bob", list[0].Username)
|
||||
|
||||
// 9. Tasks & Schedules
|
||||
// 9. Tasks
|
||||
taskDef, ok := ctx.Tasks().Get("user:send_email_code")
|
||||
require.True(t, ok)
|
||||
assert.Equal(t, 3, taskDef.Retry)
|
||||
|
||||
Reference in New Issue
Block a user