leadguru-jobs 0.247.0__py3-none-any.whl → 0.248.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: leadguru-jobs
3
- Version: 0.247.0
3
+ Version: 0.248.0
4
4
  Summary: LGT jobs builds
5
5
  Author-email: developer@leadguru.co
6
6
  Classifier: Development Status :: 5 - Production/Stable
@@ -19,9 +19,9 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
19
  Classifier: Topic :: Internet
20
20
  Requires-Dist: loguru
21
21
  Requires-Dist: pydantic
22
- Requires-Dist: cachetools (>=3.1.0)
23
- Requires-Dist: leadguru-common (==0.305.0)
24
- Requires-Dist: leadguru-data (==0.312.0)
22
+ Requires-Dist: cachetools >=3.1.0
23
+ Requires-Dist: leadguru-common ==0.308.0
24
+ Requires-Dist: leadguru-data ==0.315.0
25
25
  Requires-Dist: wheel
26
26
  Requires-Dist: setuptools
27
27
  Requires-Dist: twine
@@ -6,17 +6,17 @@ lgt_jobs/runner.py,sha256=4BTaokK7qmYEU0-6TUtfdbR2VdJVsMIIn_7ufgA7Z_k,2180
6
6
  lgt_jobs/simple_job.py,sha256=sta7MP-57iwRewPycmTAc9dvSbocbGjWhb1QYYj7ccA,519
7
7
  lgt_jobs/smtp.py,sha256=W9OIkckBORAWEsNgIG3nVKs6OTU6esZNnq09WDsj8Lc,1352
8
8
  lgt_jobs/jobs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- lgt_jobs/jobs/analytics.py,sha256=0luZ0wUvT7ZcY-heoVkC1-bhcfOfUOYpSk21LvO2riw,1321
9
+ lgt_jobs/jobs/analytics.py,sha256=bNQpYBPz6CMN0i-wXDzQKcc1L8UYUvyiVGJbUeGdf9Q,1307
10
10
  lgt_jobs/jobs/archive_leads.py,sha256=wZ4LwbuC9G7NB16AO15YiMemEV40LoJVjd8VRqaFv9o,831
11
11
  lgt_jobs/jobs/bot_stats_update.py,sha256=OlnaqUxLY3cWynwQiCyfrciiujWpVBIHx_8OvYRzfuo,2758
12
12
  lgt_jobs/jobs/chat_history.py,sha256=z9_WfmCyDc-r_qK-Eze4tnEG3ek-HUxyHa8ywSSraA4,5620
13
13
  lgt_jobs/jobs/clear_user_analytics.py,sha256=sP90jhOcZqs67hJV-lJyFJH9Iciqai8IsbNs5fSc90U,2478
14
14
  lgt_jobs/jobs/conversation_replied.py,sha256=pMkalznkVt_j20VfXzZcaGIMXxkIknxDlHKvu4_yrrs,2584
15
- lgt_jobs/jobs/inbox_leads.py,sha256=xaek0LOlRtjS2ilITo2iy7Dl8Btubr1SwsdY1Z9B71Q,3582
15
+ lgt_jobs/jobs/inbox_leads.py,sha256=x1SX_ulXNnyyO_45-YwUkVGMnp43JR-g3i8CZs5LhSE,3822
16
16
  lgt_jobs/jobs/mass_message.py,sha256=UK2IO9rb1neQWGFz_NYeXTMCa5kWoSLou3P3K19Lc10,1771
17
17
  lgt_jobs/jobs/reactions_added.py,sha256=1fhSWBSfj82cdXJLznjPlaCSooAsmCIs_6AaoTQG6mY,2410
18
18
  lgt_jobs/jobs/reindex_conversation_history.py,sha256=heBrXcEgsT426FZRQ0cCz57ZcN_h4_x1W8tEjhn7LI8,1064
19
- lgt_jobs/jobs/send_code.py,sha256=KG_7acX4KJMbGY5uhy602DMgGc3r95Mf9jlgEQaxSlo,767
19
+ lgt_jobs/jobs/send_code.py,sha256=VTp7vIoL2MJbzn_FpmZZgF1jMcNdBGpcXAc2BFo2c4A,759
20
20
  lgt_jobs/jobs/send_slack_message.py,sha256=ifF_X8WysS38eQKfAYde-SSQJf2fKAzDjr2fKtDmq3M,2853
21
21
  lgt_jobs/jobs/update_slack_profile.py,sha256=lYOi2jn2vhB_smDypy0655SONyjHU_k17Bbxe3r57Pc,3826
22
22
  lgt_jobs/jobs/user_balance_update.py,sha256=x8mcq-S-f4-weGmuvyqram0ixJ2HcdDg5wgMI1SKQFE,2295
@@ -25,7 +25,7 @@ lgt_jobs/jobs/workspace_connect.py,sha256=-EL6YrUhAOAR3dv1HZ12D9xvxL1JHP5208eh6s
25
25
  lgt_jobs/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
26
  lgt_jobs/services/web_client.py,sha256=HP-4_3yVjDSscve2_8RCnyGwsnYRwZ6iEgePxarXZE4,1797
27
27
  lgt_jobs/templates/new_message_mail_template.html,sha256=82XdDPtmkJVUWUcZtgd8bv_9-viAG2WWOnf3AhR6PeY,3635
28
- leadguru_jobs-0.247.0.dist-info/METADATA,sha256=umCa22r3Rh2F5JekUfqkNuxCMCDf1tsHOtyp2vwDPJc,1187
29
- leadguru_jobs-0.247.0.dist-info/WHEEL,sha256=AtBG6SXL3KF_v0NxLf0ehyVOh0cold-JbJYXNGorC6Q,92
30
- leadguru_jobs-0.247.0.dist-info/top_level.txt,sha256=rIuw1DqwbnZyeoarBSC-bYeGOhv9mZBs7_afl9q4_JI,9
31
- leadguru_jobs-0.247.0.dist-info/RECORD,,
28
+ leadguru_jobs-0.248.0.dist-info/METADATA,sha256=b0U3WS9QaZyCQpBB7SoKNqXUbBg4G_Oo7aPZob_flNg,1181
29
+ leadguru_jobs-0.248.0.dist-info/WHEEL,sha256=5sUXSg9e4bi7lTLOHcm6QEYwO5TIF1TNbTSVFVjcJcc,92
30
+ leadguru_jobs-0.248.0.dist-info/top_level.txt,sha256=rIuw1DqwbnZyeoarBSC-bYeGOhv9mZBs7_afl9q4_JI,9
31
+ leadguru_jobs-0.248.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.41.0)
2
+ Generator: bdist_wheel (0.41.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -17,7 +17,7 @@ class TrackAnalyticsJobData(BaseBackgroundJobData, BaseModel):
17
17
  name: str
18
18
  event: str
19
19
  extra_ids: List[str] = []
20
- attributes: conlist(Optional[str], min_length=1)
20
+ attributes: conlist(Optional[str])
21
21
  created_at: datetime.datetime
22
22
 
23
23
 
@@ -59,7 +59,7 @@ class InboxLeadsJob(BaseBackgroundJob, ABC):
59
59
  people = SlackContactUserRepository().find_one(sender_id)
60
60
  if not people:
61
61
  slack_profile = slack_client.get_profile(sender_id).get('user')
62
- InboxLeadsJob.create_people(slack_profile, dedicated_bot.name)
62
+ InboxLeadsJob.create_people(slack_profile, dedicated_bot)
63
63
 
64
64
  lead = UserLeadModel.from_dic(self.v3_client.save_lead_from_contact(sender_id, user.email))
65
65
  self.v3_client.update_user_lead(lead.message.message_id, user.email,
@@ -67,8 +67,13 @@ class InboxLeadsJob(BaseBackgroundJob, ABC):
67
67
  log.info(f"[InboxLeadsJob]: Added inbox lead {lead.id} for user: {user.email}")
68
68
 
69
69
  @staticmethod
70
- def create_people(slack_profile: dict, workspace_name: str):
71
- member_info: SlackMemberInformation = SlackMemberInformation.from_slack_response(slack_profile, workspace_name)
72
- SlackContactUserRepository().collection().update_one({"user": member_info.user, "workspace": workspace_name},
70
+ def create_people(slack_profile: dict, dedicated_bot: DedicatedBotModel):
71
+ member_info: SlackMemberInformation = SlackMemberInformation.from_slack_response(slack_profile,
72
+ dedicated_bot.name)
73
+ SlackContactUserRepository().collection().update_one({"sender_id": member_info.sender_id,
74
+ "source.source_id": dedicated_bot.workspace_id},
73
75
  {"$set": member_info.to_dic()}, upsert=True)
74
- return SlackContactUserRepository().find_one(member_info.user)
76
+ return SlackContactUserRepository().find_one(member_info.sender_id)
77
+
78
+
79
+ InboxLeadsJob().exec(InboxLeadsJobData())
@@ -23,5 +23,5 @@ class SendSlackEmailJob(BaseBackgroundJob):
23
23
  client = SlackWebClient('')
24
24
  code_sent = client.confirm_email(data.email, data.user_agent, data.locale)
25
25
  if not code_sent:
26
- log.warning(f'Unable to confirm code due to error: {code_sent.content}')
26
+ log.warning(f'Unable to confirm code due to error: {code_sent}')
27
27
  return