ominfra 0.0.0.dev127__py3-none-any.whl → 0.0.0.dev129__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. ominfra/deploy/_executor.py +24 -0
  2. ominfra/pyremote/_runcommands.py +24 -0
  3. ominfra/scripts/journald2aws.py +24 -0
  4. ominfra/scripts/supervisor.py +1320 -1225
  5. ominfra/supervisor/configs.py +34 -11
  6. ominfra/supervisor/dispatchers.py +7 -6
  7. ominfra/supervisor/dispatchersimpl.py +29 -22
  8. ominfra/supervisor/groups.py +1 -1
  9. ominfra/supervisor/groupsimpl.py +2 -2
  10. ominfra/supervisor/inject.py +22 -17
  11. ominfra/supervisor/io.py +82 -0
  12. ominfra/supervisor/main.py +6 -7
  13. ominfra/supervisor/pipes.py +15 -13
  14. ominfra/supervisor/poller.py +36 -35
  15. ominfra/supervisor/{processes.py → process.py} +2 -1
  16. ominfra/supervisor/{processesimpl.py → processimpl.py} +42 -54
  17. ominfra/supervisor/setup.py +1 -1
  18. ominfra/supervisor/setupimpl.py +4 -3
  19. ominfra/supervisor/signals.py +56 -50
  20. ominfra/supervisor/spawning.py +2 -1
  21. ominfra/supervisor/spawningimpl.py +24 -21
  22. ominfra/supervisor/supervisor.py +72 -134
  23. ominfra/supervisor/types.py +45 -34
  24. ominfra/supervisor/utils/__init__.py +0 -0
  25. ominfra/supervisor/utils/diag.py +31 -0
  26. ominfra/supervisor/utils/fds.py +46 -0
  27. ominfra/supervisor/utils/fs.py +47 -0
  28. ominfra/supervisor/utils/os.py +45 -0
  29. ominfra/supervisor/utils/ostypes.py +9 -0
  30. ominfra/supervisor/utils/signals.py +60 -0
  31. ominfra/supervisor/utils/strings.py +105 -0
  32. ominfra/supervisor/{users.py → utils/users.py} +11 -8
  33. {ominfra-0.0.0.dev127.dist-info → ominfra-0.0.0.dev129.dist-info}/METADATA +3 -3
  34. {ominfra-0.0.0.dev127.dist-info → ominfra-0.0.0.dev129.dist-info}/RECORD +39 -33
  35. ominfra/supervisor/context.py +0 -84
  36. ominfra/supervisor/datatypes.py +0 -113
  37. ominfra/supervisor/utils.py +0 -206
  38. /ominfra/supervisor/{collections.py → utils/collections.py} +0 -0
  39. {ominfra-0.0.0.dev127.dist-info → ominfra-0.0.0.dev129.dist-info}/LICENSE +0 -0
  40. {ominfra-0.0.0.dev127.dist-info → ominfra-0.0.0.dev129.dist-info}/WHEEL +0 -0
  41. {ominfra-0.0.0.dev127.dist-info → ominfra-0.0.0.dev129.dist-info}/entry_points.txt +0 -0
  42. {ominfra-0.0.0.dev127.dist-info → ominfra-0.0.0.dev129.dist-info}/top_level.txt +0 -0
@@ -189,6 +189,30 @@ def check_not_equal(l: T, r: T) -> T:
189
189
  return l
190
190
 
191
191
 
192
+ def check_is(l: T, r: T) -> T:
193
+ if l is not r:
194
+ raise ValueError(l, r)
195
+ return l
196
+
197
+
198
+ def check_is_not(l: T, r: ta.Any) -> T:
199
+ if l is r:
200
+ raise ValueError(l, r)
201
+ return l
202
+
203
+
204
+ def check_in(v: T, c: ta.Container[T]) -> T:
205
+ if v not in c:
206
+ raise ValueError(v, c)
207
+ return v
208
+
209
+
210
+ def check_not_in(v: T, c: ta.Container[T]) -> T:
211
+ if v in c:
212
+ raise ValueError(v, c)
213
+ return v
214
+
215
+
192
216
  def check_single(vs: ta.Iterable[T]) -> T:
193
217
  [v] = vs
194
218
  return v
@@ -272,6 +272,30 @@ def check_not_equal(l: T, r: T) -> T:
272
272
  return l
273
273
 
274
274
 
275
+ def check_is(l: T, r: T) -> T:
276
+ if l is not r:
277
+ raise ValueError(l, r)
278
+ return l
279
+
280
+
281
+ def check_is_not(l: T, r: ta.Any) -> T:
282
+ if l is r:
283
+ raise ValueError(l, r)
284
+ return l
285
+
286
+
287
+ def check_in(v: T, c: ta.Container[T]) -> T:
288
+ if v not in c:
289
+ raise ValueError(v, c)
290
+ return v
291
+
292
+
293
+ def check_not_in(v: T, c: ta.Container[T]) -> T:
294
+ if v in c:
295
+ raise ValueError(v, c)
296
+ return v
297
+
298
+
275
299
  def check_single(vs: ta.Iterable[T]) -> T:
276
300
  [v] = vs
277
301
  return v
@@ -968,6 +968,30 @@ def check_not_equal(l: T, r: T) -> T:
968
968
  return l
969
969
 
970
970
 
971
+ def check_is(l: T, r: T) -> T:
972
+ if l is not r:
973
+ raise ValueError(l, r)
974
+ return l
975
+
976
+
977
+ def check_is_not(l: T, r: ta.Any) -> T:
978
+ if l is r:
979
+ raise ValueError(l, r)
980
+ return l
981
+
982
+
983
+ def check_in(v: T, c: ta.Container[T]) -> T:
984
+ if v not in c:
985
+ raise ValueError(v, c)
986
+ return v
987
+
988
+
989
+ def check_not_in(v: T, c: ta.Container[T]) -> T:
990
+ if v in c:
991
+ raise ValueError(v, c)
992
+ return v
993
+
994
+
971
995
  def check_single(vs: ta.Iterable[T]) -> T:
972
996
  [v] = vs
973
997
  return v