Skip to content

Commit

Permalink
hm
Browse files Browse the repository at this point in the history
  • Loading branch information
jchanolm committed Dec 4, 2024
1 parent d8c36ca commit 69b114c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pipelines/ingest-farcaster-data/cyphers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def __init__(self):

def create_user_fid_index(self):
logging.info("Creating users index...")
query = """CREATE INDEX farcaster_user_fid_index IF NOT EXISTS FOR (u:User:Farcaster) ON (u.fid)"""
query = """CREATE INDEX farcaster_user_fid_index IF NOT EXISTS FOR (u:User) ON (u.fid)"""
self.query(query)

def create_cast_index(self):
Expand All @@ -18,7 +18,7 @@ def create_cast_index(self):

def create_wallet_index(self):
logging.info("Creating wallets index...")
query = """CREATE INDEX farcaster_wallet_address_index IF NOT EXISTS FOR (w:Wallet:Farcaster) ON (w.address)"""
query = """CREATE INDEX farcaster_wallet_address_index IF NOT EXISTS FOR (w:Wallet) ON (w.address)"""
self.query(query)

def create_channel_id_index(self):
Expand Down
10 changes: 5 additions & 5 deletions pipelines/ingest-farcaster-data/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def create_channel_followers(self):
'username': self.cyphers.sanitize_text(user.get('username', '')),
'display_name': self.cyphers.sanitize_text(user.get('display_name', '')),
'custody_address': user.get('custody_address', ''),
'allWallets': user.get('verified_addresses').get('eth_addresses'),
'allWallets': user.get('verified_addresses', {}).get('eth_addresses', []),
'bio_text': self.cyphers.sanitize_text(user.get('profile', {}).get('bio', {}).get('text', '')),
'power_badge': user.get('power_badge', '')
} for user in channel["followers"] if isinstance(user, dict)])
Expand Down Expand Up @@ -102,13 +102,13 @@ def create_connect_channel_casts(self):
"""
Connect authors
"""
self.cyphers.connect_casts_authors()
# self.cyphers.connect_casts_authors()

def run(self):
self.create_indexes()
self.create_or_merge_channels()
self.create_channel_followers()
self.connect_channel_members()
# self.create_or_merge_channels()
# self.create_channel_followers()
# self.connect_channel_members()
self.create_connect_channel_casts()

if __name__ == "__main__":
Expand Down

0 comments on commit 69b114c

Please sign in to comment.