port-ocean 0.12.2.dev12__py3-none-any.whl → 0.12.2.dev13__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.

Potentially problematic release.


This version of port-ocean might be problematic. Click here for more details.

@@ -61,26 +61,27 @@ def repeat_every(
61
61
  async def loop() -> None:
62
62
  nonlocal repetitions
63
63
 
64
- if wait_first:
65
- await asyncio.sleep(seconds)
66
- while max_repetitions is None or repetitions < max_repetitions:
67
- # count the repetition even if an exception is raised
68
- repetitions += 1
69
- try:
70
- if is_coroutine:
71
- task = asyncio.create_task(func())
72
- signal_handler.register(lambda: task.cancel())
73
- ensure_future(task)
74
- else:
75
- await run_in_threadpool(func)
76
- except Exception as exc:
77
- formatted_exception = "".join(
78
- format_exception(type(exc), exc, exc.__traceback__)
79
- )
80
- logger.error(formatted_exception)
81
- if raise_exceptions:
82
- raise exc
64
+ # if wait_first:
65
+ # await asyncio.sleep(seconds)
66
+ # count the repetition even if an exception is raised
67
+ repetitions += 1
68
+ try:
69
+ if is_coroutine:
70
+ task = asyncio.create_task(func())
71
+ signal_handler.register(lambda: task.cancel())
72
+ ensure_future(task)
73
+ else:
74
+ run_in_threadpool(func)
75
+ except Exception as exc:
76
+ formatted_exception = "".join(
77
+ format_exception(type(exc), exc, exc.__traceback__)
78
+ )
79
+ logger.error(formatted_exception)
80
+ if raise_exceptions:
81
+ raise exc
83
82
  await asyncio.sleep(seconds)
83
+ if max_repetitions is None or repetitions < max_repetitions:
84
+ asyncio.get_event_loop().call_later(seconds, loop)
84
85
 
85
86
  ensure_future(loop())
86
87
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: port-ocean
3
- Version: 0.12.2.dev12
3
+ Version: 0.12.2.dev13
4
4
  Summary: Port Ocean is a CLI tool for managing your Port projects.
5
5
  Home-page: https://app.getport.io
6
6
  Keywords: ocean,port-ocean,port
@@ -135,12 +135,12 @@ port_ocean/utils/async_iterators.py,sha256=iw3cUHxfQm3zUSPdw2FmSXDU8E1Ppnys4TGhs
135
135
  port_ocean/utils/cache.py,sha256=3KItZDE2yVrbVDr-hoM8lNna8s2dlpxhP4ICdLjH4LQ,2231
136
136
  port_ocean/utils/misc.py,sha256=0q2cJ5psqxn_5u_56pT7vOVQ3shDM02iC1lzyWQ_zl0,2098
137
137
  port_ocean/utils/queue_utils.py,sha256=KWWl8YVnG-glcfIHhM6nefY-2sou_C6DVP1VynQwzB4,2762
138
- port_ocean/utils/repeat.py,sha256=IMOGPuwAcoVmcHK5l7s1ZODJB9Xck6jZxNHFbdYQd9w,3401
138
+ port_ocean/utils/repeat.py,sha256=6acByfRzTXYQMkL9vBLZqvYM0IHV1I6EjfwnvqoWImY,3411
139
139
  port_ocean/utils/signal.py,sha256=z9iJBw8aAfxGKwlSHjhEq1g8HbPkCaYpVMyvtisrjZU,1365
140
140
  port_ocean/utils/time.py,sha256=pufAOH5ZQI7gXvOvJoQXZXZJV-Dqktoj9Qp9eiRwmJ4,1939
141
141
  port_ocean/version.py,sha256=UsuJdvdQlazzKGD3Hd5-U7N69STh8Dq9ggJzQFnu9fU,177
142
- port_ocean-0.12.2.dev12.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
143
- port_ocean-0.12.2.dev12.dist-info/METADATA,sha256=hzkdR-UH6FZRj9cd9PMV9IObpMrRRd8hpzzVM83lcnM,6713
144
- port_ocean-0.12.2.dev12.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
145
- port_ocean-0.12.2.dev12.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
146
- port_ocean-0.12.2.dev12.dist-info/RECORD,,
142
+ port_ocean-0.12.2.dev13.dist-info/LICENSE.md,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
143
+ port_ocean-0.12.2.dev13.dist-info/METADATA,sha256=xkoOnVA59qSgE-hgS_eUF_SMyiGB28fOkJg0xJA2k4M,6713
144
+ port_ocean-0.12.2.dev13.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
145
+ port_ocean-0.12.2.dev13.dist-info/entry_points.txt,sha256=F_DNUmGZU2Kme-8NsWM5LLE8piGMafYZygRYhOVtcjA,54
146
+ port_ocean-0.12.2.dev13.dist-info/RECORD,,