cicada 0.8.2__py3-none-any.whl → 0.9.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.
@@ -155,11 +155,9 @@ def main(schedule_id, dbname=None):
155
155
  command = str(row[0])
156
156
  parameters = str(row[1])
157
157
 
158
- full_command = []
159
- full_command.extend(command.split())
160
- full_command.extend(parameters.split())
158
+ full_command = scheduler.get_full_command(command, parameters)
161
159
 
162
- human_full_command = str(" ".join(full_command))
160
+ human_full_command = str(command + " " + parameters)
163
161
 
164
162
  # Check to see that schedule is not already running
165
163
  if get_is_running(db_cur, schedule_id) == 0:
cicada/lib/postgres.py CHANGED
@@ -19,7 +19,9 @@ def db_cicada(dbname=None):
19
19
  user = definitions["db_cicada"]["user"]
20
20
  password = definitions["db_cicada"]["password"]
21
21
 
22
- conn = psycopg2.connect(host=host, port=port, dbname=dbname, user=user, password=password, sslmode="prefer")
22
+ conn = psycopg2.connect(
23
+ host=host, port=port, dbname=dbname, user=user, password=password, sslmode="require", application_name="cicada"
24
+ )
23
25
  conn.autocommit = True
24
26
 
25
27
  return conn
cicada/lib/scheduler.py CHANGED
@@ -11,6 +11,7 @@ import sys
11
11
  import os
12
12
  import datetime
13
13
  import socket
14
+ import shlex
14
15
  from croniter import croniter
15
16
 
16
17
  from cicada.lib import postgres
@@ -252,6 +253,14 @@ def get_schedule_executable(db_cur, schedule_id):
252
253
  return obj_schedule_executable
253
254
 
254
255
 
256
+ def get_full_command(command, parameters):
257
+ """Generate Full Command"""
258
+ full_command = []
259
+ full_command.extend(shlex.split(command))
260
+ full_command.extend(shlex.split(parameters))
261
+ return full_command
262
+
263
+
255
264
  def get_all_schedules(db_cur, server_id, is_async):
256
265
  """Extract all candidate schedules for a server
257
266
  +--------- minute (0 - 59)
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: cicada
3
- Version: 0.8.2
3
+ Version: 0.9.0
4
4
  Summary: Lightweight, agent-based, distributed scheduler
5
5
  Home-page: https://github.com/transferwise/cicada
6
6
  Author: Wise
@@ -8,19 +8,28 @@ Classifier: License :: OSI Approved :: Apache Software License
8
8
  Classifier: Programming Language :: Python :: 3 :: Only
9
9
  Description-Content-Type: text/markdown
10
10
  License-File: LICENSE
11
- Requires-Dist: psycopg2-binary ==2.9.*
12
- Requires-Dist: pyyaml ==6.0.*
13
- Requires-Dist: croniter ==2.0.*
14
- Requires-Dist: tabulate ==0.9.*
15
- Requires-Dist: slack-sdk ==3.30.*
16
- Requires-Dist: backoff ==2.2.*
11
+ Requires-Dist: psycopg2-binary==2.9.*
12
+ Requires-Dist: pyyaml==6.0.*
13
+ Requires-Dist: croniter<3.1,>=2.0
14
+ Requires-Dist: tabulate==0.9.*
15
+ Requires-Dist: slack-sdk==3.37.*
16
+ Requires-Dist: backoff==2.2.*
17
17
  Provides-Extra: dev
18
- Requires-Dist: pytest ==8.2.* ; extra == 'dev'
19
- Requires-Dist: pytest-cov ==5.0.* ; extra == 'dev'
20
- Requires-Dist: pytest-mock ==3.14.* ; extra == 'dev'
21
- Requires-Dist: black ==24.4.* ; extra == 'dev'
22
- Requires-Dist: flake8 ==7.1.* ; extra == 'dev'
23
- Requires-Dist: freezegun ==1.5.* ; extra == 'dev'
18
+ Requires-Dist: pytest==8.2.*; extra == "dev"
19
+ Requires-Dist: pytest-cov==5.0.*; extra == "dev"
20
+ Requires-Dist: pytest-mock==3.14.*; extra == "dev"
21
+ Requires-Dist: black==24.4.*; extra == "dev"
22
+ Requires-Dist: flake8==7.1.*; extra == "dev"
23
+ Requires-Dist: freezegun==1.5.*; extra == "dev"
24
+ Dynamic: author
25
+ Dynamic: classifier
26
+ Dynamic: description
27
+ Dynamic: description-content-type
28
+ Dynamic: home-page
29
+ Dynamic: license-file
30
+ Dynamic: provides-extra
31
+ Dynamic: requires-dist
32
+ Dynamic: summary
24
33
 
25
34
  # Cicada scheduler
26
35
 
@@ -58,7 +67,7 @@ Requires-Dist: freezegun ==1.5.* ; extra == 'dev'
58
67
 
59
68
  ## Setup Central Database
60
69
 
61
- Verified on **PostgreSQL** versions *9.6* to *12.9*
70
+ Verified on **PostgreSQL** versions *12.9* to *15.14*
62
71
 
63
72
  1. Execute as **postgres** user [setup/db_and_user.sql](setup/db_and_user.sql)
64
73
  2. Change **cicada** user password
@@ -69,7 +78,7 @@ Verified on **PostgreSQL** versions *9.6* to *12.9*
69
78
 
70
79
  ## Setup Node
71
80
 
72
- Verified on *Ubuntu 18.04 and 20.04 LTS*
81
+ Verified on *Ubuntu 18.04, 20.04 LTS and 22.04 LTS*
73
82
 
74
83
  Prerequisites
75
84
 
@@ -3,7 +3,7 @@ cicada/cli.py,sha256=-2XcWtwRIx8tb0cisdhBT6MFue8ANCOsVrQNIqme_9s,10148
3
3
  cicada/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  cicada/commands/archive_schedule_log.py,sha256=S0qcFajRcwtXMlOTPkHduXqdHQspzM046UAQxN8oPVo,2231
5
5
  cicada/commands/delete_schedule.py,sha256=iNoE243gX9M3bBxOsgiusga5At5UnXIUpHkElsNz8-w,548
6
- cicada/commands/exec_schedule.py,sha256=ywQEPPBKjzUe2S6Di45F1Iir7TblJ4bnd3psP9oCKMQ,8868
6
+ cicada/commands/exec_schedule.py,sha256=a__pTzJ2vbJrWcMCzhylAekal_W4CkOcZAIOKQSnCms,8832
7
7
  cicada/commands/exec_server_schedules.py,sha256=5TyDsQiUH9dx59GLO33aekSoUNO7g_HcHVvJW1yLjj8,1240
8
8
  cicada/commands/list_schedules.py,sha256=vzRQVAs2yzsuyGV9yeQEpgmvFL5zIZlyMT-jbR7AybA,545
9
9
  cicada/commands/list_server_schedules.py,sha256=-uxikgecitRh8YYe0WgL1AOLO6cfow1_lqmPeSVz4xE,1910
@@ -13,12 +13,12 @@ cicada/commands/show_schedule.py,sha256=fC7jRFN5xrhKEq-9N_evEdBavbS7KtQ5dfgg4IWA
13
13
  cicada/commands/spread_schedules.py,sha256=N8ni0n9mFKenC4iiBgw7X9QPV3XZf9L0u5sKvUbajH8,4507
14
14
  cicada/commands/upsert_schedule.py,sha256=pacujqNF7lzgHCG9XR4JkSlitV1s99par9hA-dMul8o,3740
15
15
  cicada/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
- cicada/lib/postgres.py,sha256=DTPKRNYTi5yMC6xPPhX2l4U8hpSfTfciE77pfjd_H24,840
17
- cicada/lib/scheduler.py,sha256=oAidM2NgkOqQ6QzbAA2x-4lVA9K4pJMsPvm-hECgxo8,13201
16
+ cicada/lib/postgres.py,sha256=HEkz_-NPlBFCks3hoqXhrEndYkr8hDRui-NQWFHMqXo,882
17
+ cicada/lib/scheduler.py,sha256=NQHnSw465HWPHRfW5NDCtvcTFOIvX1WWQyJoLb9L5Ao,13432
18
18
  cicada/lib/utils.py,sha256=qlXe6DnKJTqrdWeIuj_0fEQ-VhMJSzentf28KV-7uOs,2247
19
- cicada-0.8.2.dist-info/LICENSE,sha256=jj_FHHgRjgQBUlPrrRsnr50zEOAhlg6gqU7mEqisyB0,10844
20
- cicada-0.8.2.dist-info/METADATA,sha256=iBxdfaTSf6akdljQvj3nAHNNjBQYAQd01YTqZ0LSs9E,5669
21
- cicada-0.8.2.dist-info/WHEEL,sha256=cpQTJ5IWu9CdaPViMhC9YzF8gZuS5-vlfoFihTBC86A,91
22
- cicada-0.8.2.dist-info/entry_points.txt,sha256=Dzf3ul9hWITR4nfTDyNCtFTcQOOE57mD1x2qVniUWdE,43
23
- cicada-0.8.2.dist-info/top_level.txt,sha256=xZCtaMDbCi2CKA5PExum99ZU54IJg5iognV-k44a1W0,7
24
- cicada-0.8.2.dist-info/RECORD,,
19
+ cicada-0.9.0.dist-info/licenses/LICENSE,sha256=jj_FHHgRjgQBUlPrrRsnr50zEOAhlg6gqU7mEqisyB0,10844
20
+ cicada-0.9.0.dist-info/METADATA,sha256=0N9PhqIF46kSHxd9Jw2p8iq9gex_vlA1KSYP3iut_AA,5863
21
+ cicada-0.9.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
22
+ cicada-0.9.0.dist-info/entry_points.txt,sha256=Dzf3ul9hWITR4nfTDyNCtFTcQOOE57mD1x2qVniUWdE,43
23
+ cicada-0.9.0.dist-info/top_level.txt,sha256=xZCtaMDbCi2CKA5PExum99ZU54IJg5iognV-k44a1W0,7
24
+ cicada-0.9.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.1.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5