Skip to content
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

feat: cdb 2663 ipfs queue service #30

Merged
merged 10 commits into from
Dec 13, 2023

Conversation

stephhuynh18
Copy link
Collaborator

@stephhuynh18 stephhuynh18 commented Aug 31, 2023

confirmed that the pubsub response messages published via this service actually works!

@linear
Copy link

linear bot commented Aug 31, 2023

CDB-2663 IPFS Queue + Service

Description

Queue to receive IPFS job messages

IPFS service that reads off the IPFS queue and completes the job

The only possible job will be publishing QUERY responses

@stephhuynh18 stephhuynh18 requested review from smrz2001 and removed request for smrz2001 August 31, 2023 22:45
services/ipfs.go Outdated Show resolved Hide resolved
models/messages.go Outdated Show resolved Hide resolved
services/ipfs.go Outdated Show resolved Hide resolved
services/ipfs.go Outdated Show resolved Hide resolved
services/ipfs.go Outdated Show resolved Hide resolved
common/ipfs/api.go Show resolved Hide resolved
services/test_helpers.go Show resolved Hide resolved
common/ipfs/api.go Outdated Show resolved Hide resolved
services/ipfs.go Outdated Show resolved Hide resolved
common/ipfs/api.go Outdated Show resolved Hide resolved
services/ipfs.go Outdated Show resolved Hide resolved
common/ipfs/api.go Outdated Show resolved Hide resolved
common/ipfs/api.go Outdated Show resolved Hide resolved
services/ipfs.go Outdated Show resolved Hide resolved
common/ipfs/api.go Outdated Show resolved Hide resolved
common/ipfs/api.go Outdated Show resolved Hide resolved
common/ipfs/api.go Outdated Show resolved Hide resolved
common/ipfs/api.go Outdated Show resolved Hide resolved
common/ipfs/api.go Outdated Show resolved Hide resolved
return nil
}

func (i *IpfsApi) processIpfsTask(ctx context.Context, task any) (any, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func (i *IpfsApi) processIpfsTask(ctx context.Context, task any) (any, error) {
func (i *IpfsApi) processIpfsTask(ctx context.Context, task any) error {
if pubsubPublishTask, ok := task.(models.PubSubPublishTask); ok {
return i.pubsubPublish(ctx, pubsubPublishTask)
}
return fmt.Errorf("unknown ipfs task received %v", task)
}

Copy link
Collaborator

@smrz2001 smrz2001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀🚀🚀

@stephhuynh18 stephhuynh18 merged commit ac647c5 into develop Dec 13, 2023
2 checks passed
@stephhuynh18 stephhuynh18 deleted the feature/cdb-2663-ipfs-queue-service branch December 13, 2023 17:52
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.

2 participants