File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -21,15 +21,25 @@ there::
2121
2222 pip install im-data-manager-job-utilities
2323
24- Once installed you can use the utilitites using the supplied classes::
24+ Once installed you can use the utilities using the supplied classes::
2525
2626 >>> from dm_job_utilities.dm_log import DmLog
27+ >>> from decimal import Decimal
2728 >>> DmLog.emit_event('Hello World!')
2829 2022-02-03T16:39:27+00:00 # INFO -EVENT- Hello World!
29- >>> DmLog.emit_cost(5.7)
30+ >>> DmLog.emit_cost(Decimal(' 5.7') )
3031 2022-02-03T16:40:16+00:00 # INFO -COST- 5.7 1
3132
3233
34+ Costs are *total * by default but can be issued as an incremental value::
35+
36+ >>> DmLog.emit_cost(Decimal('0.5'), incremental=True)
37+ 2022-02-03T16:40:16+00:00 # INFO -COST- +0.5 2
38+
39+
40+ The final value on the COST line is a unique sequence number. This value
41+ is required and is used by the Data Manager to avoid duplicating costs.
42+
3343.. _PyPI : https://pypi.org/project/im-data-manager-job-utilities
3444
3545Get in touch
You can’t perform that action at this time.
0 commit comments