06b7e49e98
* Store view counts & last viewed time * Schedule updating user recommendations. Compute using tf-idf. * Update contract's lastBetTime and lastCommentTime on new bets and comments. * Remove contract's lastUpdatedTime * Remove folds activity feed * Implement getFeed cloud function * Hook up client to use getFeed * Script to cache viewCounts and lastViewTime * Batched wait all userRecommendations * Cache view script runs on all users * Update user feed each hour and get feed from cache doc. * Delete view cache script * Update feed script * Tweak feed algorithm * Compute recommendation scores from updateUserFeed * Disable lastViewedScore factor * Update lastCommentTime script * Comment out console.log * Fix timeout issue by calling new cloud functions with part of the work. * Listen for contract updates to feed. * Handle new user: use default feed of top markets this week * Track lastUpdatedTime * Tweak logic of calling cloud functions in batches * Tweak cloud function batching
30 lines
866 B
TypeScript
30 lines
866 B
TypeScript
import * as admin from 'firebase-admin'
|
|
|
|
admin.initializeApp()
|
|
|
|
// export * from './keep-awake'
|
|
export * from './transact'
|
|
export * from './place-bet'
|
|
export * from './resolve-market'
|
|
export * from './stripe'
|
|
export * from './sell-bet'
|
|
export * from './sell-shares'
|
|
export * from './create-contract'
|
|
export * from './create-user'
|
|
export * from './create-fold'
|
|
export * from './create-answer'
|
|
export * from './on-create-bet'
|
|
export * from './on-create-comment'
|
|
export * from './on-fold-follow'
|
|
export * from './on-fold-delete'
|
|
export * from './on-view'
|
|
export * from './unsubscribe'
|
|
export * from './update-contract-metrics'
|
|
export * from './update-user-metrics'
|
|
export * from './update-recommendations'
|
|
export * from './update-feed'
|
|
export * from './backup-db'
|
|
export * from './change-user-info'
|
|
export * from './market-close-emails'
|
|
export * from './add-liquidity'
|