summaryrefslogtreecommitdiff
path: root/taskflow/examples
Commit message (Collapse)AuthorAgeFilesLines
* Remove sixTakashi Kajinami2022-05-189-39/+26
| | | | | | | | This library no longer supports Python 2, thus usage of six can be removed. This also removes workaround about pickle library used in Python 2 only. Change-Id: I19d298cf0f402d65f0b142dea0bf35cf992332a9
* Remove class StopWatch from timingchenghuiyu2017-10-241-2/+2
| | | | | | | | In new release timeutils.StopWatch can be used from oslo.uitls, so it was deprecated for removal in timing.py Change-Id: I138b8d276998a4ea2537966767cbd14f96daf757 Closes-Bug: #1715043
* Remove white space between print and ()haobing12016-07-181-3/+3
| | | | Change-Id: Ie181f5bdcd17b213586face17b8c6d9cbf6384db
* Fixes: typo error in commentsrahulram2016-07-081-1/+1
| | | | Change-Id: I3e2bd1f4acaa9a36531b70d886d7407f59dfecb7
* Remove deprecated things for 2.0 releaseJoshua Harlow2016-05-102-5/+5
| | | | Change-Id: Id9adbc50bd51adc77ce88f698ad0ea2ee63fc5e2
* Allow for specifying green threaded to parallel engineJoshua Harlow2016-05-031-21/+13
| | | | | | | | | | | | | Currently when a string is passed to the parallel engine it will only know how to create a process or a native thread based executor. The futurist library also supports making a green thread based executor, so support creating it. This will save glance some code that they have to create a executor based on different options (one of those is a green option). Change-Id: I15c164a38b4445d28eb6062aed6c56cce0e0364b
* Merge "99 bottles example trace logging was not being output"Jenkins2016-04-281-2/+4
|\
| * 99 bottles example trace logging was not being outputJoshua Harlow2016-01-201-2/+4
| | | | | | | | | | | | | | | | | | | | When 'v' was provided as a last argument trace logging is supposed to be enabled, but it seems like due to the prior configuration of ERROR level it was not so this fixes that and only configures the ERROR level if verbose argument is not present. Change-Id: I527ab1868e4eb5544e0f502e655ba8fcc5913014
* | Add some basic/initial engine statisticsJoshua Harlow2016-02-012-1/+9
|/ | | | | | | | | | | | | | | It can be quite nice to expose a basic set of metrics about the internals of an engine, including the time in each state, and how long the engine is active for and likely more in the future. To start add a engine statistics property and gather some basic timing data and place this data into this property for access (and/or introspection) by users. Part of blueprint gather-engine-statistics Change-Id: Ibc3c78755bd8ae779b52fc4772519f243a521576
* Avoid running this example if zookeeper is not foundJoshua Harlow2015-08-221-2/+21
| | | | Change-Id: I4461dcbfc28bed839deeb4e4564daa07c55b42b0
* Merge "Remove **most** usage of taskflow.utils in examples"Jenkins2015-07-2110-59/+66
|\
| * Remove **most** usage of taskflow.utils in examplesJoshua Harlow2015-07-1710-59/+66
| | | | | | | | | | | | | | | | | | | | It appears folks are using the taskflow.utils code in there own code-bases (likely taking it from the examples) which we do not want to encourage, so remove the usage of **most** of taskflow.utils code from the examples so that people are less likely to copy/paste/reference it. Change-Id: I0ce3c520de347e3e746e7912aa1366a515458424
* | Merge "Run the '99_bottles.py' demo at a fast rate when activated"Jenkins2015-07-171-4/+21
|\ \ | |/ |/|
| * Run the '99_bottles.py' demo at a fast rate when activatedJoshua Harlow2015-07-101-4/+21
| | | | | | | | | | | | | | | | | | | | | | When this is ran without any arguments just run it locally by starting a producer, then a conductor, then stopping after it finishes the first song request. This allows this example to be ran during unit testing to make sure it functions as expected (with zero return code). Change-Id: I26c210e2c993e770955985c9c779d303eb8c0616
* | Merge "Integrate futurist (and **remove** taskflow originating code)"Jenkins2015-07-114-11/+12
|\ \ | |/ |/|
| * Integrate futurist (and **remove** taskflow originating code)Joshua Harlow2015-07-094-11/+12
| | | | | | | | Change-Id: If89baa042695f19e42b6368034f3ccf22c2cf0aa
* | Merge "Allow the 99_bottles.py demo to run in BLATHER mode"Jenkins2015-07-111-7/+10
|\ \
| * | Allow the 99_bottles.py demo to run in BLATHER modeJoshua Harlow2015-07-081-7/+10
| | | | | | | | | | | | Change-Id: I0889fe109d95ee705ca3b224db135a490b846d53
* | | Merge "Show job posted and goodbye in 99_bottles.py example"Jenkins2015-07-111-1/+11
|\ \ \
| * | | Show job posted and goodbye in 99_bottles.py exampleJoshua Harlow2015-07-081-1/+11
| |/ / | | | | | | | | | | | | | | | | | | | | | This makes it more obvious exactly what this job poster has done and why it exited (all it is supposed to do is post some work and die). Change-Id: I7e83f90e0af0edf8836d6950b45905982e32a57f
* | | Merge "Rename logbook module -> models module"Jenkins2015-07-112-6/+6
|\ \ \ | |_|/ |/| |
| * | Rename logbook module -> models moduleJoshua Harlow2015-07-082-6/+6
| |/ | | | | | | | | | | | | | | | | | | | | Since this module contains more than the logbook class and really is a our generic models that are used to hold the runtime structure it is more appropriate to place it under a models module and deprecate the usage of the old module by placing a warning there (so that when it is imported that warning is triggered). Change-Id: I79def5ee08f560d38f2c9dcefd0b33becc2a4d36
* | Merge "Add support for conditional execution"Jenkins2015-07-091-0/+75
|\ \ | |/ |/|
| * Add support for conditional executionJoshua Harlow2015-07-011-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To make it possible to alter the runtime flow via a simple conditional like structure make it possible to have the graph flow link function take a decider that is expected to be some callable that will decide (via a boolean return) whether the edge should actually be traversed when running. When a decider returns false; the affected + successors will be set into the IGNORE state and they will be exempt from future runtime and scheduling decisions. Part of blueprint taskflow-conditional-execution Change-Id: Iab0ee46f86d6b8e747911174d54a7295b3fa404d
* | Merge "Notify on the individual engine steps"Jenkins2015-07-081-5/+41
|\ \
| * | Notify on the individual engine stepsJoshua Harlow2015-07-081-5/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a conductor is running it is quite useful to be able to how long each engine step takes. To enable this information being output, add a notifier to the base conductor and use it in the blocking conductor to emit events around engine activities. This makes it possible to track the timing (or other information that can be gathered from these events) in a non-intrusive manner. In the `99_bottles.py` demo we also now use this to be able to easily see what the conductor is actively doing (without having to enable the more verbose DEBUG level logging). Change-Id: Ifd8ff38f82fc8135fe5fec4c8e41f0e06f4fdee3
* | | Merge "Handle conductor ctrl-c more appropriately"Jenkins2015-07-081-19/+35
|\ \ \ | |/ / | | / | |/ |/|
| * Handle conductor ctrl-c more appropriatelyJoshua Harlow2015-06-181-19/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | When a conductor program is interrupted via ctrl-c or equivalent it is much nicer log that that has happened and to reraise that exception. This also slightly tweaks the 99 bottles song to make it even better, by having more pieces/tasks, which makes it possible to kill the program during each task and see how the resumption works when a flow is composed of segments. Change-Id: I5d242eba9a043ef96646ba74ea5928daa0691ed0
* | Merge "Remove usage of deprecated 'task_notifier' property in build_car example"Jenkins2015-06-291-2/+2
|\ \
| * | Remove usage of deprecated 'task_notifier' property in build_car exampleJoshua Harlow2015-06-121-2/+2
| | | | | | | | | | | | Change-Id: Ia9d18c09709d550a017c5efbe1075b9a551496f6
* | | Merge "Add indestructible 99 bottles of beer example"Jenkins2015-06-291-0/+139
|\ \ \ | | |/ | |/|
| * | Add indestructible 99 bottles of beer exampleJoshua Harlow2015-06-151-0/+139
| | | | | | | | | | | | Change-Id: Ic4edc7e04e8c3b70ce2f5e398db20363fa797cf8
* | | Merge "Add `simple_linear_listening` example to generated docs"Jenkins2015-06-211-2/+2
|\ \ \ | |/ / |/| |
| * | Add `simple_linear_listening` example to generated docsJoshua Harlow2015-06-121-2/+2
| |/ | | | | | | | | | | | | This one is a nice to have in the examples, and should also be updated to not use deprecated properties. Change-Id: I5ee754525caccf0a9ea2a2b00aaa4e0d305e55b7
* | Remove example not testedJoshua Harlow2015-06-101-171/+0
|/ | | | | | | | This example is not automatically tested and is better served by other examples involving conductors, jobs, and such so it doesn't seem to have much value to retain it. Change-Id: Idc622bb6e6098507c99758614a96feb6a8a9b0c8
* Add a new `ls_r` methodJoshua Harlow2015-06-041-1/+1
| | | | | | | | | | | | | | | | | | | Instead of having a `ls` method that when used recursively *always* returns the absolute path of items in the fake in memory storage tree and *relative* paths (when used in non-recursive mode) add a new `ls_r` method that can return absolute *or* relative paths. In the future it is highly likely that the the `ls` recursive keyword argument will be removed (so preferring and moving to the `ls_r` should occur earlier rather than later), so this also adds a debtcollector removed keyword argument decorator over the existing `ls` to ensure that users are aware of this change (as well as a adjusted docstring). Fixes bug 1458114 Change-Id: Id2a5869e94ac44679020a14297d1073d1dc2718f
* Remove customized pyX.Y tox requirementsJoshua Harlow2015-05-291-0/+9
| | | | | | | | | | | | | | | | Instead of having custom pyX.Y that test a specific set of requirements and similar with other tox envs, just enable more test-requirements directly, in a later change we will use environment markers to denote the differences. Also tweaks the jobboard example to bypass/hack a needed eventlet fix into it so that it actually runs without breaking/never finishing. A TODO note has been left to eventually (someday?) remove this hack when it is no longer needed. Part of fix for bug 1445827 Change-Id: I0fb669f0bdfbe4fe81d89234173f2c3ac4d06de6
* Add a conductor running exampleJoshua Harlow2015-04-201-0/+243
| | | | | | | | | | | | Create an example which can be extended to create a simplistic review checkout, tox running system which can be used to run some set of actions on every review posted. This could be expanded and connected into a gerrit pipeline to create a mini-jenkins like trigger/build/result system. Part of ongoing blueprint more-examples Change-Id: I5cf1bf02eeddf897ac7f098f1d73377f262a267b
* Merge "Add a example showing how to share an executor"Jenkins2015-04-091-0/+81
|\
| * Add a example showing how to share an executorJoshua Harlow2015-04-031-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | To ensure that it is easily known how to share a futures executor across engines make an example that just does that so that people can easily reference an example when they need/want to do this. Part of blueprint share-engine-thread Part of blueprint more-examples Change-Id: I7a74da50d076157b9fbccdcbd6dff1b3b9cd93b6
* | Merge "Allow ls() to list recursively (using breadth-first)"Jenkins2015-04-051-6/+1
|\ \ | |/ |/|
| * Allow ls() to list recursively (using breadth-first)Joshua Harlow2015-03-311-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | Make it easier to list the contents of the full in-memory filesystem by allowing the ls() function to take a recursive keyword argument (which by default is false). This makes it easier to analyze the contents of the full in memory filesystem; saving people from creating similar code themselves. Change-Id: I573797945255cb81728e7a86b58768b848110ee7
* | Fix a couple of spelling and grammar errorsRick van de Loo2015-03-2921-36/+36
|/ | | | | | | Some things that popped out while reading the comments/documentation. Change-Id: I0ccecae3381447ede44bb855d91f997349be1562
* Have this example exit non-zero if incorrect resultsJoshua Harlow2015-03-131-0/+25
| | | | | | | | | When this examples engine does not produce the expected results have it exit with a non-zero error code so that the users knows (and so that the example testing system fails when this happens). Change-Id: I8c3b80a7dc1c7ef47d7804526346883b24caabc4
* Merge "update uses of TimingListener to DurationListener"Jenkins2015-03-121-1/+1
|\
| * update uses of TimingListener to DurationListenerDan Krause2015-03-101-1/+1
| | | | | | | | Change-Id: I10ac9a9c82b08d606c253080ca343008880305c4
* | Add a in-memory backend dumping exampleJoshua Harlow2015-03-121-0/+83
|/ | | | Change-Id: Ie29735a16129cedd574e09ed06b44a98560f0d90
* Improve upon/adjust/move around new optional exampleJoshua Harlow2015-02-112-93/+109
| | | | | | | | | | Instead of having the optional requirements example be a example that is itself a unittest just move the example to be an actual unit test that gets tested using the various engine types and change the example to be something slightly different (but shows the same kind of usage information). Change-Id: Ia03a81a6be636c501a35e7e290f587f7d05f8b30
* Map optional arguments as well as required argumentsMin Pae2015-02-101-0/+93
| | | | | | | | | Optional arguments that are not explicitly required are being ignored when arguments are being mapped based on inference from atoms' execute method signatures. This patch adds support for mapping optional arguments in addition to required arguments. Change-Id: I440c02dcd901a563df512e33754b13e3c05d4155
* Use the class defined constant instead of raw stringsJoshua Harlow2015-01-293-10/+18
| | | | | | | | | | In examples and documentation it is better if we recommend good practices for using the notifications and the good/better practice would be to use the class defined constant instead of using a raw string (in-case taskflow ever changes that constant value sometime in the future). Change-Id: Ied8fc88747f8635de4aa776095e7e0195d6043aa