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: trigger data refresher manually #731

Merged
merged 3 commits into from
Oct 28, 2023
Merged

refactor: trigger data refresher manually #731

merged 3 commits into from
Oct 28, 2023

Conversation

wa0x6e
Copy link
Contributor

@wa0x6e wa0x6e commented Oct 27, 2023

Extracted from #712

Trigger the space and moderation data refresher manually, instead of automatically on import.

This allow skipping the refresh, and is particularly useful on test suite

@wa0x6e wa0x6e requested a review from ChaituVR October 27, 2023 06:18
@wa0x6e wa0x6e changed the title Fix 729 refactor: trigger data refresher manually Oct 27, 2023
@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (6b79c3c) 2.43% compared to head (47e4ac0) 2.42%.
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master    #731      +/-   ##
=========================================
- Coverage    2.43%   2.42%   -0.01%     
=========================================
  Files          39      39              
  Lines        2014    2017       +3     
  Branches       37      37              
=========================================
  Hits           49      49              
- Misses       1928    1931       +3     
  Partials       37      37              
Files Coverage Δ
src/helpers/moderation.ts 0.00% <0.00%> (ø)
src/helpers/spaces.ts 0.00% <0.00%> (ø)
src/index.ts 0.00% <0.00%> (ø)
src/helpers/metrics.ts 0.00% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/api.ts Outdated
import { name, version } from '../package.json';
import { sendError } from './helpers/utils';

const router = express.Router();
const network = process.env.NETWORK || 'testnet';
const SEQUENCER_URL = process.env.SEQUENCER_URL || '';

refreshSpacesCache();
Copy link
Member

Choose a reason for hiding this comment

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

Why this one here and refreshModerationData in index.ts 😅 better to keep all in one place

Copy link
Member

@ChaituVR ChaituVR left a comment

Choose a reason for hiding this comment

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

utAck

@wa0x6e wa0x6e merged commit cf26dfe into master Oct 28, 2023
4 checks passed
@wa0x6e wa0x6e deleted the fix-729 branch October 28, 2023 05:48
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