leadguru-jobs 0.246.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.
- {leadguru_jobs-0.246.0.dist-info → leadguru_jobs-0.248.0.dist-info}/METADATA +4 -4
- {leadguru_jobs-0.246.0.dist-info → leadguru_jobs-0.248.0.dist-info}/RECORD +8 -8
- {leadguru_jobs-0.246.0.dist-info → leadguru_jobs-0.248.0.dist-info}/WHEEL +1 -1
- lgt_jobs/__init__.py +5 -3
- lgt_jobs/jobs/analytics.py +1 -1
- lgt_jobs/jobs/inbox_leads.py +10 -5
- lgt_jobs/jobs/send_code.py +1 -1
- {leadguru_jobs-0.246.0.dist-info → leadguru_jobs-0.248.0.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: leadguru-jobs
|
3
|
-
Version: 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
|
23
|
-
Requires-Dist: leadguru-common
|
24
|
-
Requires-Dist: leadguru-data
|
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
|
@@ -1,4 +1,4 @@
|
|
1
|
-
lgt_jobs/__init__.py,sha256=
|
1
|
+
lgt_jobs/__init__.py,sha256=Q3DJ-EMH44iO9KZlQ2t-XbfrvLpPzxdxOZaarFywNT8,3351
|
2
2
|
lgt_jobs/basejobs.py,sha256=LPEclvY6fIG17YMGy9pRK0Q58n62gkI5W1BTK6R2p-c,1234
|
3
3
|
lgt_jobs/env.py,sha256=M4nlt7SpwEYptNCopc6c3V0hpsHKc9bO60FnlGc7rTE,712
|
4
4
|
lgt_jobs/main.py,sha256=g9cIpahGFXZZv6fsftbjrOhQMrrD04kxKOuPpxKk3rk,1545
|
@@ -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=
|
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=
|
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=
|
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.
|
29
|
-
leadguru_jobs-0.
|
30
|
-
leadguru_jobs-0.
|
31
|
-
leadguru_jobs-0.
|
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,,
|
lgt_jobs/__init__.py
CHANGED
@@ -14,7 +14,7 @@ from .jobs.reindex_conversation_history import ReIndexUserLeadsConversationHisto
|
|
14
14
|
ReIndexUserLeadsConversationHistoryJobData
|
15
15
|
from .jobs.clear_user_analytics import ClearUserAnalyticsJobData, ClearUserAnalyticsJob
|
16
16
|
from .jobs.inbox_leads import InboxLeadsJob, InboxLeadsJobData
|
17
|
-
|
17
|
+
from .jobs.mass_message import SendMassMessageSlackChannelJob, SendMassMessageSlackChannelJobData
|
18
18
|
from .basejobs import (BaseBackgroundJobData, BaseBackgroundJob, InvalidJobTypeException)
|
19
19
|
from .smtp import (SendMailJob, SendMailJobData)
|
20
20
|
from .runner import (BackgroundJobRunner)
|
@@ -35,7 +35,8 @@ jobs_map = {
|
|
35
35
|
"UpdateUserBalanceJob": UpdateUserBalanceJob,
|
36
36
|
"ReIndexUserLeadsConversationHistoryJob": ReIndexUserLeadsConversationHistoryJob,
|
37
37
|
"ClearUserAnalyticsJob": ClearUserAnalyticsJob,
|
38
|
-
"InboxLeadsJob": InboxLeadsJob
|
38
|
+
"InboxLeadsJob": InboxLeadsJob,
|
39
|
+
"SendMassMessageSlackChannelJob": SendMassMessageSlackChannelJob
|
39
40
|
}
|
40
41
|
__all__ = [
|
41
42
|
# Jobs
|
@@ -55,6 +56,7 @@ __all__ = [
|
|
55
56
|
ReIndexUserLeadsConversationHistoryJob,
|
56
57
|
ClearUserAnalyticsJob,
|
57
58
|
InboxLeadsJob,
|
59
|
+
SendMassMessageSlackChannelJob,
|
58
60
|
|
59
61
|
# module classes
|
60
62
|
BackgroundJobRunner,
|
@@ -76,7 +78,7 @@ __all__ = [
|
|
76
78
|
ReIndexUserLeadsConversationHistoryJobData,
|
77
79
|
ClearUserAnalyticsJobData,
|
78
80
|
InboxLeadsJobData,
|
79
|
-
|
81
|
+
SendMassMessageSlackChannelJobData,
|
80
82
|
# mapping
|
81
83
|
jobs_map
|
82
84
|
]
|
lgt_jobs/jobs/analytics.py
CHANGED
lgt_jobs/jobs/inbox_leads.py
CHANGED
@@ -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
|
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,
|
71
|
-
member_info: SlackMemberInformation = SlackMemberInformation.from_slack_response(slack_profile,
|
72
|
-
|
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.
|
76
|
+
return SlackContactUserRepository().find_one(member_info.sender_id)
|
77
|
+
|
78
|
+
|
79
|
+
InboxLeadsJob().exec(InboxLeadsJobData())
|
lgt_jobs/jobs/send_code.py
CHANGED
@@ -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
|
26
|
+
log.warning(f'Unable to confirm code due to error: {code_sent}')
|
27
27
|
return
|
File without changes
|