leadguru-jobs 0.629.0__py3-none-any.whl → 0.631.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.629.0
3
+ Version: 0.631.0
4
4
  Summary: LGT jobs builds
5
5
  Author-email: developer@leadguru.co
6
6
  Classifier: Development Status :: 5 - Production/Stable
@@ -40,16 +40,16 @@ lgt_jobs/lgt_common/slack_client/web_client.py,sha256=WCu8mqYhauuxp9iDAMsjocchKD
40
40
  lgt_jobs/lgt_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
41
41
  lgt_jobs/lgt_data/analytics.py,sha256=yfrFPXrBofzZqUNn479JkrbZXDa2ljgk-Le0YrQ9rew,21690
42
42
  lgt_jobs/lgt_data/engine.py,sha256=GY8FOl3dl7euKjQRML_H3ophaSTgfQ8ICMRv1NpE2oE,7745
43
- lgt_jobs/lgt_data/enums.py,sha256=3IV06umcBLXMCWnXUO66fyPM8IVwfCVbiSCjcwYMqCY,2238
43
+ lgt_jobs/lgt_data/enums.py,sha256=27Gd_o5QVCrSUMIfL0DJ72xV77T9fK0kYrOaC78O0SU,2292
44
44
  lgt_jobs/lgt_data/helpers.py,sha256=S_1P7pnx14dllmen-TzjA9pkKWQr39x8-v6iv7FUYnQ,423
45
- lgt_jobs/lgt_data/model.py,sha256=ZBrkUJf7agbqASTEejN5gbL1Q5L2S15KPgVNT0J2X2M,34498
45
+ lgt_jobs/lgt_data/model.py,sha256=RTFXWRnjCpgpSCsyVBpBt_DccwLwPWQVaVLD2e6QQRk,34699
46
46
  lgt_jobs/lgt_data/mongo_repository.py,sha256=RVnpPqsozpHN2rBzH73xQUgfqnXUTzb505RGLXZoT5c,47284
47
47
  lgt_jobs/lgt_data/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
- lgt_jobs/lgt_data/models/message_request.py,sha256=yL4dUY_3UQNMnaVwub1bwPnLNT7o1bToShaamVprjvo,552
48
+ lgt_jobs/lgt_data/models/message_request.py,sha256=3kzFkpinOvIeTu1ViZrhU__eHKeh-YJuZFv5ELkotpY,446
49
49
  lgt_jobs/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
50
  lgt_jobs/services/web_client.py,sha256=oMyWJxwGeIe3f40fPT7xcisjDg3BhA3Ipf8dr1jVT-Y,1549
51
51
  lgt_jobs/templates/new_message.html,sha256=dZl8UmdAOOMq4nidvAgMFroSrTV7Pw0RWt2yLp_2idg,6989
52
- leadguru_jobs-0.629.0.dist-info/METADATA,sha256=k0ZuLye9xe3lRGn24ca9LKVxgbJAidxHgBSuTCc23aA,1319
53
- leadguru_jobs-0.629.0.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
54
- leadguru_jobs-0.629.0.dist-info/top_level.txt,sha256=rIuw1DqwbnZyeoarBSC-bYeGOhv9mZBs7_afl9q4_JI,9
55
- leadguru_jobs-0.629.0.dist-info/RECORD,,
52
+ leadguru_jobs-0.631.0.dist-info/METADATA,sha256=l96Ryuro3XGy5j-_52T6ZBYf9NbMfAVUL7tPkAU-XUA,1319
53
+ leadguru_jobs-0.631.0.dist-info/WHEEL,sha256=Rp8gFpivVLXx-k3U95ozHnQw8yDcPxmhOpn_Gx8d5nc,91
54
+ leadguru_jobs-0.631.0.dist-info/top_level.txt,sha256=rIuw1DqwbnZyeoarBSC-bYeGOhv9mZBs7_afl9q4_JI,9
55
+ leadguru_jobs-0.631.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (71.1.0)
2
+ Generator: setuptools (72.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -96,3 +96,4 @@ class NotificationType(str, Enum):
96
96
  ONCE_A_DAY = 'once_a_day'
97
97
  ONCE_A_WEEK = 'once_a_week'
98
98
  WEEK_BEFORE = 'week_before'
99
+ UNREAD_FOR_FEW_MINUTES = 'unread_for_few_minutes'
@@ -274,6 +274,11 @@ class Notification(DictionaryModel):
274
274
 
275
275
  now = datetime.now(UTC)
276
276
  current_week_day = datetime.isoweekday(now)
277
+
278
+ if (self.type == NotificationType.UNREAD_FOR_FEW_MINUTES
279
+ and self.last_notification and (now.minute - self.minute <= self.last_notification.minute)):
280
+ return False
281
+
277
282
  if self.type == NotificationType.ONCE_A_WEEK and current_week_day != self.day:
278
283
  return False
279
284
 
@@ -1,14 +1,14 @@
1
- from lgt_jobs.lgt_data.enums import SourceType
2
1
  from lgt_jobs.lgt_data.model import ChatMessage, DedicatedBotModel
3
2
 
4
3
 
5
4
  class MessageRequest(ChatMessage):
6
- hidden: bool = False
7
- source_type: SourceType
5
+ hidden: bool
6
+
7
+ def __init__(self):
8
+ super().__init__()
9
+ self.hidden = False
8
10
 
9
11
  @classmethod
10
12
  def from_slack_response(cls, bot: DedicatedBotModel, message_data: dict, sender_id: str):
11
13
  message = super().from_slack_response(bot, message_data, sender_id)
12
- message_request = MessageRequest.from_dic(message.to_dic())
13
- message_request.source_type = bot.source.source_type
14
- return message_request
14
+ return MessageRequest.from_dic(message.to_dic())