-
Notifications
You must be signed in to change notification settings - Fork 247
[WIP] Feat: Payload Store Repository #2047
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
task_id BIGINT NOT NULL, | ||
task_inserted_at TIMESTAMPTZ NOT NULL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unsure if this is a good idea or not - I was trying to think of cases where we'd want to tie payloads to non-task things but was struggling to think of any
workflows: newWorkflowRepository(shared), | ||
ticker: newTickerRepository(shared), | ||
filters: newFilterRepository(shared), | ||
payloadStore: shared.payloadStore, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was pretty unhappy with this. The reason for it is we need to be able to access the payload store inside of the match repo, the tasks repo, the olap repo, etc., but we also need it on the dispatcher. Would love better ideas here, since I think this also will break the ability to override but I'm not sure about that
} | ||
|
||
func (p *payloadStoreRepositoryImpl) Store(ctx context.Context, tenantId string, payloads []StorePayloadOpts) error { | ||
tx, commit, rollback, err := sqlchelpers.PrepareTx(ctx, p.pool, p.l, 5000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
basic idea here is we can change this to have any backend (e.g. S3 with a cache, etc.) so that we can plug whatever we need in. For S3, we might use e.g. taskId/taskInsertedAt/type.json
as the key or something like that
94dd25c
to
9e80a34
Compare
Description
WIP
Footguns / things to consider:
triggers
field in the payloads somehowType of change