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

Release/v1.7.3 x #9907

Merged
merged 297 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
297 commits
Select commit Hold shift + click to select a range
9031a35
truncate bodies async script
timolegros Oct 24, 2024
9b71dd0
fix script + delete old script
timolegros Oct 24, 2024
9e4810e
Merge branch 'master' into rotorsoft/9641-get-thread-count
Oct 24, 2024
d611e6c
Merge branch 'master' into rotorsoft/9646-get-threads-by-ids
Oct 24, 2024
1935530
fix name, archived_at null, and cache invalidation
Oct 24, 2024
05900e7
fix lint
Oct 24, 2024
0700797
truncate thread body
timolegros Oct 24, 2024
7473cf0
Merge branch 'master' into rotorsoft/9646-get-threads-by-ids
Oct 24, 2024
1034438
start merging thread schemas
Oct 24, 2024
10ecbf1
Merge branch 'master' of https://github.com/hicommonwealth/commonweal…
KaleemNeslit Oct 24, 2024
c8ee744
add NOT NULL constraint to thread bodies
timolegros Oct 24, 2024
8ccb96a
add beforeValidate hook to thread models
timolegros Oct 24, 2024
b1e9b2a
add beforeValidate hook to comment models
timolegros Oct 24, 2024
fed6a83
fix more thread typings
Oct 24, 2024
243ec0a
cleanup.
burtonator Oct 24, 2024
516f017
fix contest rollover query
rbennettcw Oct 24, 2024
f45e8d7
fix more typing issues
Oct 24, 2024
5316314
info log
rbennettcw Oct 24, 2024
f8e84f6
Merge branch 'master' of https://github.com/hicommonwealth/commonweal…
KaleemNeslit Oct 24, 2024
b14cc80
Issue#7424-adding-custom-stages-should-not-delete-snapshot
salman-neslit Oct 24, 2024
f404899
Merge branch 'master' into rotorsoft/9641-get-thread-count
Oct 24, 2024
28c5a88
merge master
Oct 24, 2024
ad874c8
use lifetime thread count in community
Oct 24, 2024
aebfa1e
Merge branch 'demo' into ryan/evm-bignumber
rbennettcw Oct 24, 2024
154b4fd
type fixes
rbennettcw Oct 24, 2024
d8b3909
lint
rbennettcw Oct 24, 2024
2c776ed
log
rbennettcw Oct 24, 2024
49d29b9
Merge branch 'master' into ryan/evm-bignumber
rbennettcw Oct 24, 2024
8a494fd
ramond-ui-bug-fixes
salman-neslit Oct 24, 2024
1a05e40
Merge pull request #9661 from hicommonwealth/burton/editor-v5
burtonator Oct 25, 2024
60be084
Merge branch 'master' into tim/truncate-bodies-async
timolegros Oct 25, 2024
aea7ce5
test fixes
timolegros Oct 25, 2024
884c040
more test/type fixes
timolegros Oct 25, 2024
d9c5a88
type fix
timolegros Oct 25, 2024
b7b224c
test fix
timolegros Oct 25, 2024
905e244
integration test fix
timolegros Oct 25, 2024
554c8e7
Merge branch 'master' into rotorsoft/9646-get-threads-by-ids
Oct 25, 2024
2b9e353
Merge pull request #9678 from hicommonwealth/salman/Issue#7424-adding…
timolegros Oct 25, 2024
77092b4
Merge pull request #9642 from hicommonwealth/rotorsoft/9641-get-threa…
Rotorsoft Oct 25, 2024
98dde33
reconcile all thread queries with thread view
Oct 25, 2024
af5decf
Merge branch 'master' of https://github.com/hicommonwealth/commonweal…
KaleemNeslit Oct 25, 2024
77dafdc
merge master
KaleemNeslit Oct 25, 2024
272c4a3
Add copy button to erc20 token address
masvelio Oct 25, 2024
8dd2a62
Merge branch 'master' into rotorsoft/9646-get-threads-by-ids
Oct 25, 2024
c289895
Merge pull request #9680 from hicommonwealth/salman/Issue#9627-Ramond…
salman-neslit Oct 25, 2024
e6ee002
Merge pull request #9499 from hicommonwealth/kaleemNeslit.9242.sideba…
KaleemNeslit Oct 25, 2024
5ada8f3
fix types
Oct 25, 2024
1678226
fix types
Oct 25, 2024
87cf7fc
fix lint
Oct 25, 2024
2b93ea5
create contest view
Oct 25, 2024
7e60f4d
fix with moment, fix search query
Oct 25, 2024
93d6a40
reconcile contest view
Oct 25, 2024
7b4ebc6
fix lint
Oct 25, 2024
d02c44a
overview-thread-should-not-show-comments
salman-neslit Oct 25, 2024
d3c0118
save content url for votes
rbennettcw Oct 25, 2024
9197467
Merge branch 'master' into ryan/evm-bignumber
rbennettcw Oct 25, 2024
44016d5
log
rbennettcw Oct 25, 2024
95a5c9d
user no longer redirected to /undefinded/discussion/etc from profile
Israellund Oct 25, 2024
b9cac79
deleted unused var
Israellund Oct 25, 2024
79f0505
replaced ts-expect-error to pass tests
Israellund Oct 25, 2024
5906e09
deleted community_id from Thread to pass tests
Israellund Oct 25, 2024
36f2d8b
thread header now has more space away from tabs
Israellund Oct 25, 2024
2e2fc60
added the pagination on Home screen with trpc
KaleemNeslit Oct 26, 2024
c648e46
remove conflict
KaleemNeslit Oct 26, 2024
c06e604
Merge branch 'master' of https://github.com/hicommonwealth/commonweal…
KaleemNeslit Oct 26, 2024
101f27d
conflict on sidebar
KaleemNeslit Oct 26, 2024
735a243
eslint
KaleemNeslit Oct 26, 2024
af1793e
made fetchNextPage() async
KaleemNeslit Oct 26, 2024
16922ed
eslint
KaleemNeslit Oct 26, 2024
df70474
fixed the test case for user_dashboard
KaleemNeslit Oct 26, 2024
07812bf
remove console
KaleemNeslit Oct 26, 2024
37add98
rename-show-comments-button
salman-neslit Oct 28, 2024
d57c73c
CI
masvelio Oct 28, 2024
7dc07a5
Merge pull request #9682 from hicommonwealth/marcin/9679/view-erc20-a…
masvelio Oct 28, 2024
75efb64
Added token card component
mzparacha Oct 28, 2024
66e299e
Added tokens list in explore page
mzparacha Oct 28, 2024
86e3d64
Added empty state for tokens list
mzparacha Oct 28, 2024
03e2692
Fix lint
mzparacha Oct 28, 2024
281de0e
optional-channing-syntax
salman-neslit Oct 28, 2024
d4582ba
Updated pricing todo
mzparacha Oct 28, 2024
3c065cd
Merge pull request #9691 from hicommonwealth/israel.9448.thread-title…
Israellund Oct 28, 2024
092ad06
migration
timolegros Oct 28, 2024
920b608
sequelize model updates
timolegros Oct 28, 2024
9e64ffa
schema updates
timolegros Oct 28, 2024
f114b43
truncation-thread-no-showing-show-more
salman-neslit Oct 28, 2024
061c654
comment command updates
timolegros Oct 28, 2024
902cd11
e2e seeder updates
timolegros Oct 28, 2024
3cfd264
discobot policy update
timolegros Oct 28, 2024
2612812
sanitizeDeletedComment update
timolegros Oct 28, 2024
5e2382a
canvas updates
timolegros Oct 28, 2024
6c3eb49
knock worker updates
timolegros Oct 28, 2024
2bee6a2
thread life cycle test updates
timolegros Oct 28, 2024
218014f
more test updates
timolegros Oct 28, 2024
b775194
legacy integration test fixes
timolegros Oct 28, 2024
041d6f5
client type fixes
timolegros Oct 28, 2024
afc7f3f
Merge pull request #9662 from hicommonwealth/ryan/evm-bignumber
rbennettcw Oct 28, 2024
80e70e5
first pass
Oct 28, 2024
c94beb0
more client side fixes
timolegros Oct 28, 2024
f7602e4
reverted changes and added different community_id
Israellund Oct 28, 2024
4194df7
fixed the issue related to the tooltip preivew on mouseEvent
KaleemNeslit Oct 28, 2024
ce77903
second pass
Oct 28, 2024
b173232
remove the thread and comment preview from ViewUpvotesDrawer
KaleemNeslit Oct 28, 2024
ef4df11
fix active threads query p1
timolegros Oct 28, 2024
e508e2b
fix types
Oct 28, 2024
a29e14c
fix lint
Oct 28, 2024
1ca442e
test fixes
timolegros Oct 28, 2024
2670a16
client side model types
timolegros Oct 28, 2024
1119eb5
lint
timolegros Oct 28, 2024
1c8762e
lint
timolegros Oct 28, 2024
80a7b40
comment version history
timolegros Oct 28, 2024
80e40fe
Merge branch 'master' of https://github.com/hicommonwealth/commonweal…
salman-neslit Oct 28, 2024
988084c
Merge pull request #9685 from hicommonwealth/salman/Issue#9433-overvi…
salman-neslit Oct 28, 2024
eee237e
fix lint errors
Oct 28, 2024
b04fa21
fix lint errors
Oct 28, 2024
419e815
fix comments
Oct 29, 2024
4cabd15
Merge branch 'master' into rotorsoft/9646-get-threads-by-ids
Oct 29, 2024
2beb923
fix type
Oct 29, 2024
00b6c24
Merge pull request #9568 from hicommonwealth/kaleemNeslit.9272.pagina…
KaleemNeslit Oct 29, 2024
fb45b93
Merge branch 'master' into rotorsoft/9646-get-threads-by-ids
timolegros Oct 29, 2024
323a473
Merge branch 'master' into rotorsoft/get-profile
Oct 29, 2024
d0da20e
fix query
Oct 29, 2024
14efe3a
fix query syntax
Oct 29, 2024
856d295
Merge branch 'master' into tim/comment-text-refactor
timolegros Oct 29, 2024
b57c5b9
attempting change to pass tests
Israellund Oct 29, 2024
7e2d132
Merge pull request #9660 from hicommonwealth/rotorsoft/9646-get-threa…
Rotorsoft Oct 29, 2024
8c908a2
Merge branch 'master' into rotorsoft/get-profile
Oct 29, 2024
0910ee4
Merge branch 'master' into rjwebb/upgrade-canvas-to-0-11-0
raykyri Oct 29, 2024
0089040
removed ts-expect-error
Israellund Oct 29, 2024
3127bf5
added comment to pass tests
Israellund Oct 29, 2024
d1baf72
added the copy-icon and copy address functionality
KaleemNeslit Oct 29, 2024
f4750a0
fix more view types
Oct 29, 2024
5ba1de7
fixed eslint
KaleemNeslit Oct 29, 2024
69d684e
fix type
Oct 29, 2024
e7e8876
Merge branch 'master' of https://github.com/hicommonwealth/commonweal…
salman-neslit Oct 29, 2024
2995a4b
Merge pull request #9698 from hicommonwealth/salman/Issue#9622/trunct…
salman-neslit Oct 29, 2024
3421d50
Merge pull request #9650 from hicommonwealth/rjwebb/upgrade-canvas-to…
raykyri Oct 30, 2024
d3efec7
fixed the pr review
KaleemNeslit Oct 30, 2024
161e54f
Merge branch 'master' into rotorsoft/get-profile
Oct 30, 2024
afeefe9
Merge pull request #9704 from hicommonwealth/kaleemNeslit.9651.toolti…
KaleemNeslit Oct 30, 2024
f61d2c8
Merge branch 'master' of https://github.com/hicommonwealth/commonweal…
KaleemNeslit Oct 30, 2024
4a0e4b9
Require image when launching token
mzparacha Oct 30, 2024
d10f06a
added type cast to pass test
Israellund Oct 30, 2024
c523ea1
Added tooltips to handle token names/symbols with many chars
mzparacha Oct 30, 2024
5a1d547
Merge pull request #9689 from hicommonwealth/9681.israel.incorrect-re…
Israellund Oct 30, 2024
ca2f9a3
Fixed vite refresh issue
kurtisassad Oct 30, 2024
6c9b816
Merge branch 'master' into malik.8803.token-asset-cards
mzparacha Oct 30, 2024
b0a3501
Merge pull request #9693 from hicommonwealth/malik.8803.token-asset-c…
mzparacha Oct 30, 2024
3a8faa5
Added code-split deps to optimizeDeps for other webpages
kurtisassad Oct 30, 2024
4ce8a50
fixed the issue for tooltip and dropdown
KaleemNeslit Oct 30, 2024
94144c7
Merge pull request #9719 from hicommonwealth/ka.viteRefreshFix
kurtisassad Oct 30, 2024
176bcd1
docs to help Ilya...
burtonator Oct 30, 2024
6d086ce
Merge branch 'master' into tim/comment-text-refactor
timolegros Oct 30, 2024
0eceb9d
type fix
timolegros Oct 30, 2024
8f6b9e8
Merge branch 'master' into tim/truncate-bodies-async
timolegros Oct 30, 2024
0f359b3
add new incrementThreadViewCount output middleware to getThreadsByIds…
timolegros Oct 30, 2024
827bcbd
remove `/viewCount` and `ViewCountCache` from server side
timolegros Oct 30, 2024
3ec707e
remove `/viewCount` usage on the client
timolegros Oct 30, 2024
2ba4d29
Merge pull request #9702 from hicommonwealth/tim/comment-text-refactor
timolegros Oct 30, 2024
a52daa3
Merge branch 'master' into tim/update-view-counts
timolegros Oct 30, 2024
1fa361a
fix server side
timolegros Oct 30, 2024
36d849d
added `--enable-source-maps` to all commands
timolegros Oct 30, 2024
129bcf5
remove coverage reporting for commonwealth/packages
timolegros Oct 31, 2024
6280a50
enable sitemap tests
timolegros Oct 31, 2024
cb62271
get rif of new trpc client
masvelio Oct 31, 2024
174743c
Merge branch 'master' of github.com:hicommonwealth/commonwealth into …
masvelio Oct 31, 2024
277fced
remove unused daemon + tests
timolegros Oct 31, 2024
60bbccf
removed old endpoint from mentions
masvelio Oct 31, 2024
ba3e640
fix zeros
masvelio Oct 31, 2024
ab8b510
CI
masvelio Oct 31, 2024
6bc13e7
create quest schemas
Oct 31, 2024
c9b63ca
Merge branch 'master' into rotorsoft/9384-create-quest
Oct 31, 2024
4c186ff
CI
masvelio Oct 31, 2024
4ac8933
CI
masvelio Oct 31, 2024
426f6ad
CI
masvelio Oct 31, 2024
1b89453
CI
masvelio Oct 31, 2024
78d2e9b
Merge pull request #9706 from hicommonwealth/kaleemNeslit.9447.Remove…
KaleemNeslit Oct 31, 2024
7bd0011
Merge pull request #9739 from hicommonwealth/marcin/9729/validation-fix
ilijabojanovic Oct 31, 2024
b20d79b
refine data model
Oct 31, 2024
e087587
Merge pull request #9725 from hicommonwealth/burton/docs-on-merging-s…
ilijabojanovic Oct 31, 2024
e44c523
Fixes issues with knock... other than the markdown issues.
burtonator Oct 31, 2024
b223756
calling it event_data now and handling community_stakes_url
burtonator Oct 31, 2024
6e94144
Merge pull request #9742 from hicommonwealth/burton/fix-the-push-noti…
burtonator Oct 31, 2024
ee37aad
add migration, reconcile models
Oct 31, 2024
4edccab
update erc20 dynamic dec
ianrowan Oct 31, 2024
f5da538
abi update
ianrowan Oct 31, 2024
da287bb
Merge branch 'master' into tim/truncate-bodies-async
timolegros Nov 1, 2024
9f5b159
merge utils
timolegros Nov 1, 2024
9b31ea2
Merge remote-tracking branch 'origin/tim/truncate-bodies-async' into …
timolegros Nov 1, 2024
2232471
Merge branch 'master' into tim/update-view-counts
timolegros Nov 1, 2024
7e6047b
fix decimals
masvelio Nov 1, 2024
ed18131
fix fund contest form
masvelio Nov 1, 2024
cd940e7
fix migration
Nov 1, 2024
59ad64b
Fix edit profile stale state
mzparacha Nov 1, 2024
01fb1e3
Merge pull request #9705 from hicommonwealth/rotorsoft/get-profile
Rotorsoft Nov 1, 2024
2a90a0b
Merge branch 'master' into rotorsoft/9384-create-quest
Nov 1, 2024
81fb2c1
add test and test utils
Nov 1, 2024
2ac35d9
fix test
Nov 1, 2024
c1d1da7
Merge pull request #9752 from hicommonwealth/9747-weighted-topic-voti…
dillchen Nov 1, 2024
bd2b286
poll contest if it is not initialised
masvelio Nov 1, 2024
b1d2f1a
fix query
Nov 1, 2024
6f40581
fix script comment.text -> comment.body
timolegros Nov 1, 2024
86c026b
Merge pull request #9669 from hicommonwealth/tim/truncate-bodies-async
timolegros Nov 1, 2024
094235b
replace sinon with vi, and fix afterEach import
Nov 1, 2024
8d5ef6c
Merge branch 'master' into rotorsoft/9384-create-quest
Nov 1, 2024
e1b0363
Merge pull request #9733 from hicommonwealth/tim/update-view-counts
timolegros Nov 1, 2024
7acbc14
Merge pull request #9734 from hicommonwealth/tim/enable-source-maps
timolegros Nov 1, 2024
ca250a6
fix test
Nov 1, 2024
b159410
Merge pull request #9763 from hicommonwealth/rotorsoft/9384-create-quest
Rotorsoft Nov 1, 2024
0d14fa3
dynamic deposit decimals
ianrowan Nov 1, 2024
e3a7a84
Merge pull request #9767 from hicommonwealth/dynamic-deposit-decimal
ilijabojanovic Nov 1, 2024
a55e9b3
toWei conversion
ianrowan Nov 1, 2024
18ad0a5
Merge pull request #9770 from hicommonwealth/dynamic-deposit-decimal
dillchen Nov 1, 2024
a526b91
fix erc20 decimal + reaction weight rendering
rbennettcw Nov 1, 2024
47a0e73
lint
rbennettcw Nov 1, 2024
c1c21da
Merge pull request #9772 from hicommonwealth/ryan/fix-erc20-decimal-w…
ilijabojanovic Nov 1, 2024
c09a867
fix reaction count on non-weighted topics
rbennettcw Nov 1, 2024
dc60514
fallback
rbennettcw Nov 1, 2024
ef252f9
Merge pull request #9773 from hicommonwealth/ryan/fix-reaction-calc
dillchen Nov 1, 2024
61550f6
modal now closes on tos and privacy click
Israellund Nov 2, 2024
7a5d4a0
Merge pull request #9766 from hicommonwealth/marcin/9765/loader-fix
masvelio Nov 4, 2024
a0aa3fc
Merge pull request #9715 from hicommonwealth/kaleemNeslit.9431.Copy_w…
KaleemNeslit Nov 4, 2024
a8cae85
Merge pull request #9783 from hicommonwealth/israel.9776.modal-close-…
Israellund Nov 4, 2024
57bdd5f
remove eth requirement
mzparacha Nov 4, 2024
c0d8abe
use private chain node url on backend
rbennettcw Nov 4, 2024
8ed2cec
fallback
rbennettcw Nov 4, 2024
a2af28a
fix user validation
timolegros Nov 4, 2024
8edb100
re-add migrate-existing-content script
timolegros Nov 4, 2024
a630f2c
update script
timolegros Nov 4, 2024
4358143
updated content migration script for missing version histories
timolegros Nov 5, 2024
725a424
hide skeleton for broken contests
rbennettcw Nov 6, 2024
e27c410
cap search limit to 50 per schema
Nov 7, 2024
c2e11bb
Return reaction count from bulk threads api
mzparacha Nov 13, 2024
bf102a8
Fix thread reaction count on discussions for non-staked communities
mzparacha Nov 13, 2024
b90fc81
Updated vote weights on reaction button in discussion page after reac…
mzparacha Nov 13, 2024
bf98732
Update thread vote weight cache after deleteing weighted reaction
mzparacha Nov 13, 2024
82cee44
Removed extra todo
mzparacha Nov 13, 2024
5502e93
Fix thread lifecycle unit tests
mzparacha Nov 13, 2024
303a5aa
Fix type
mzparacha Nov 13, 2024
795a4bf
fix test
rbennettcw Nov 13, 2024
2ee3d04
get private url
timolegros Nov 4, 2024
8e75e7e
add migration
timolegros Nov 8, 2024
6c07e57
made contests gtm growl and updated growl functionality
Israellund Nov 6, 2024
bae95b3
temp - v1.7.3-x only migration
timolegros Nov 14, 2024
ebc40a3
Merge pull request #9900 from hicommonwealth/tim/page-crash-migration
ilijabojanovic Nov 14, 2024
f611d88
fix: update reaction deletion logic and improve test assertions
ilijabojanovic Nov 14, 2024
c95a186
fix: comment out column equality assertion in model tests
ilijabojanovic Nov 14, 2024
33662b6
Revert "add migration"
ilijabojanovic Nov 14, 2024
6c0bbb5
fix: uncomment column equality assertion in model tests
ilijabojanovic Nov 14, 2024
6b07853
Merge pull request #9902 from hicommonwealth/ci_fixes_for_release
ilijabojanovic Nov 14, 2024
ce027ee
Merge branch 'production' into release/v1.7.3-x
mzparacha Nov 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -438,18 +438,11 @@ jobs:
- name: Run EVM Devnet tests
run: pnpm -F commonwealth test-devnet:evm --allowOnly=false

- name: Coveralls parallel
uses: coverallsapp/github-action@v2
with:
flag-name: evm-devnet-test-coverage
parallel: true
files: packages/commonwealth/coverage/lcov.info

report-coverage:
name: Upload Test Coverage Report
runs-on: ubuntu-latest
timeout-minutes: 5
needs: [ commonwealth-evm-tests, commonwealth-unit-tests ]
needs: [ commonwealth-unit-tests ]
if: always()
strategy:
matrix:
Expand Down
102 changes: 1 addition & 101 deletions common_knowledge/Caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,107 +266,7 @@ fn(args){
`key` param of `cacheWrap` function can be a key to either return string, or `key(..args)` which returns either string or {cacheKey, cacheDuration}.
Same arguments as wrapped fn will be passed to custom key generator function.

### Background Task Runner - Pre-fetching/ Refreshing result periodically

**Scenario:** Good candidate to be run in background.

- We don't need to compute this for every user
- Endpoint is not parameterized, we don't need user input to compute the result
- eg. Global Activity - can be fetched periodically on schedule - to always serve seemingly fresh result to user

Using `caheWrap` example from above:
First parameter of `cacheWrap` is boolean, if we want to skip cache lookup and instead want to override result in cache

**Prepare Function to run as background task**
call `cacheWrap` with first parameter as `true`

```js
const wrapFnOverride = cacheDecorator.cacheWrap(
true,
slowGoodCachingCandidateFn,
key,
duration,
CacheNamespaces.Function_Response
);
```

**Start a background task**

- It adds function to run on fixed interval
- It also run it immediately for the first time

```js
daemon.startTask(
'myWrapFnLabel',
async () => await this.wrapFnOverride(...args),
duration
);
```

**Task Signature**
Daemon can only accept function with no param

- basically, args need to be bound in advance
- change your function to format, here `..args` are bound from closure/context from where we call `daemon.startTask`

```
() => wrapOverrideFn(..args)
```

**Daemon Error Handling**
It clears the task automatically in case of failure

**Re-adding Daemon Task**
Re-adding task with same label will cancel the old task & setup new task with same label

**Cancel Task**
Task can be cancelled using same label if required `daemon.cancelTask(label)`

**Constraints**

- Running background task could be resource intensive, currently background task can be repeated with allowed interval of a 60 seconds or over

### Activity - Decorator Helper class

It hides both cache wrap & daemon from user, it declares both:

- cacheWrap
- cacheWrapOverride
- startTask method - by internally calling daemon.startTask

**Sample Usage:**
**Method to Wrap**

```
const getChainStatus = async (models: DB) => {
body....
}
```

**Generate Wrapper**

```
export const getChainActivity = new Activity(
'getChainStatus', //cache label
getChainStatus,//method to wrap
'getChainStatus', //cache key
60 * 5, // 5 minutes ttl
CacheNamespaces.Global_Response //namespace
);
```

**Drop-In Wrapper**

```js
getChainActivity.queryWithCache(models);
```

**Start Daemon Task**

```js
getChainActivity.startTask(models);
```

## Change Log

- 2401031: Modified by Timothee Legros.
- 230428: Authored by Nakul Manchanda.
27 changes: 27 additions & 0 deletions common_knowledge/GitBranching.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,30 @@ Don't rebase your branches as this will increase the risk of merge conflicts.
There’s really no major advantage to rebase other than a cleaner git history.
However, the downsides are higher risk of merge conflicts and conflicts when you
share rebased commits

# Cherry Picking Specific Branches

Let's say you want to merge a specific branch:

https://github.com/hicommonwealth/commonwealth/pull/9689/commits

You can see all the merge commits on master with this command:

```bash
git log --merges --oneline master
```

Now we should have the PR merge that we want (9689) and to compute a patch all
we have to do is diff between the commit on the next line.

```text
5a1d547b77 Merge pull request #9689 from hicommonwealth/9681.israel.incorrect-redirect-from-profile
afeefe9fa7 Merge pull request #9704 from hicommonwealth/kaleemNeslit.9651.tooltip_reverse_state
```

```bash
git diff -r afeefe9fa7 -r 5a1d547b77 > cherrypick.patch
```

This will be the cherrypicked patch file, and you can patch that onto a specific
branch with the patch command.
141 changes: 0 additions & 141 deletions libs/adapters/src/daemon.ts

This file was deleted.

7 changes: 5 additions & 2 deletions libs/adapters/src/trpc/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ export const command = <
* Builds tRPC query GET endpoint
* @param factory query factory
* @param tag query tag used for OpenAPI spec grouping
* @param forceSecure whether to force secure requests for rate-limited external-router
* @param ttlSecs cache response ttl in seconds
* @param options An object with security and caching related configuration
* @param commit output middleware (best effort), mainly used to update statistics
* - `(input,output,ctx) => Promise<Record<string,unknown>> | undefined | void`
* @returns tRPC query procedure
*/
export const query = <
Expand All @@ -108,13 +109,15 @@ export const query = <
forceSecure?: boolean;
ttlSecs?: number;
},
commit?: Commit<Input, Output>,
) => {
const md = factory();
return buildproc({
method: 'GET',
name: factory.name,
md,
tag,
commit,
forceSecure: options?.forceSecure,
}).query(async ({ ctx, input }) => {
try {
Expand Down
Loading
Loading