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

refactor: Created generic task scheduling service. #900

Merged
merged 1 commit into from
Nov 25, 2021

Conversation

bstasyszyn
Copy link
Contributor

@bstasyszyn bstasyszyn commented Nov 25, 2021

Refactored the expiry service to create a generic task scheduler that may run any task on a single instance in an Orb domain cluster.

Also created a common utility to start a MongoDB container during unit testing (since this code was copied in multiple places). The Docker container is always started on a unique port to prevent the occasional port conflict error.

closes #891

Signed-off-by: Bob Stasyszyn Bob.Stasyszyn@securekey.com

Refactored the expiry service to create a generic task scheduler that may run any generic task on a single instance in an Orb domain cluster.

closes trustbloc#891

Signed-off-by: Bob Stasyszyn <Bob.Stasyszyn@securekey.com>
@cla-bot cla-bot bot added the cla-signed label Nov 25, 2021
@codecov
Copy link

codecov bot commented Nov 25, 2021

Codecov Report

Merging #900 (75c39d6) into main (67a585d) will increase coverage by 0.03%.
The diff coverage is 88.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #900      +/-   ##
==========================================
+ Coverage   89.42%   89.45%   +0.03%     
==========================================
  Files         156      157       +1     
  Lines       14000    14057      +57     
==========================================
+ Hits        12519    12575      +56     
+ Misses        912      910       -2     
- Partials      569      572       +3     
Impacted Files Coverage Δ
cmd/orb-server/startcmd/params.go 80.18% <66.66%> (-0.16%) ⬇️
cmd/orb-server/startcmd/start.go 72.74% <80.00%> (+0.03%) ⬆️
pkg/taskmgr/taskmgr.go 89.16% <89.16%> (ø)
pkg/store/expiry/expiry.go 90.00% <100.00%> (-0.77%) ⬇️
pkg/observer/pubsub.go 94.49% <0.00%> (ø)
...pub/service/inbox/httpsubscriber/httpsubscriber.go 100.00% <0.00%> (+9.87%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f3e1de3...75c39d6. Read the comment docs.

@fqutishat fqutishat merged commit 51dc7c8 into trustbloc:main Nov 25, 2021
@bstasyszyn bstasyszyn deleted the 891 branch November 25, 2021 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor expiry service to be a generic task scheduler
3 participants