File tree Expand file tree Collapse file tree 1 file changed +0
-26
lines changed
components/notion/sources/updated-page Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Original file line number Diff line number Diff line change @@ -40,32 +40,6 @@ export default {
4040 } ,
4141 } ,
4242 hooks : {
43- async deploy ( ) {
44- const propertiesToCheck = await this . _getPropertiesToCheck ( ) ;
45- const propertyValues = { } ;
46- const params = this . lastUpdatedSortParam ( ) ;
47- const pagesStream = this . notion . getPages ( this . databaseId , params ) ;
48- let count = 0 ;
49- let lastUpdatedTimestamp = 0 ;
50- for await ( const page of pagesStream ) {
51- for ( const propertyName of propertiesToCheck ) {
52- const currentValue = this . _maybeRemoveFileSubItems ( page . properties [ propertyName ] ) ;
53- propertyValues [ page . id ] = {
54- ...propertyValues [ page . id ] ,
55- [ propertyName ] : currentValue ,
56- } ;
57- }
58- lastUpdatedTimestamp = Math . max (
59- lastUpdatedTimestamp ,
60- Date . parse ( page . last_edited_time ) ,
61- ) ;
62- if ( count ++ < 25 ) {
63- this . _emitEvent ( page ) ;
64- }
65- }
66- this . _setPropertyValues ( propertyValues ) ;
67- this . setLastUpdatedTimestamp ( lastUpdatedTimestamp ) ;
68- } ,
6943 async activate ( ) {
7044 console . log ( "Restarting -- fetching all pages and properties" ) ;
7145 const now = new Date ( ) ;
You can’t perform that action at this time.
0 commit comments